diff --git a/.coveralls.yml b/.coveralls.yml deleted file mode 100644 index 428247c..0000000 --- a/.coveralls.yml +++ /dev/null @@ -1,3 +0,0 @@ -coverage_clover: tests/logs/clover.xml -json_path: tests/logs/coveralls-upload.json -service_name: travis-ci diff --git a/.editorconfig b/.editorconfig index 8ccf5d1..dd6d900 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,15 +1,9 @@ root = true [*] +charset = utf-8 indent_style = space indent_size = 4 end_of_line = lf -charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true - -[Makefile] -indent_style = tab - -[*.php] -indent_size = 4 diff --git a/.gitattributes b/.gitattributes index ae8db70..b263871 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,14 +1,10 @@ -* text=auto -/.github export-ignore -/tests export-ignore -/.editorconfig export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore -/.travis.yml export-ignore -/.styleci.yml export-ignore -/.sensiolabs.yml export-ignore -/.coveralls.yml export-ignore -/phpunit.xml export-ignore -/CHANGELOG-* export-ignore -/CONTRIBUTING.md export-ignore -/CODE_OF_CONDUCT.md export-ignore +# Path-based git attributes +# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html + +# Ignore all test and documentation with "export-ignore". +/.gitattributes export-ignore +/.gitignore export-ignore +/.travis.yml export-ignore +/phpunit.xml.dist export-ignore +/.scrutinizer.yml export-ignore +/tests export-ignore diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 4981e3f..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -patreon: kristories diff --git a/.gitignore b/.gitignore index 2bee7c2..9769880 100644 --- a/.gitignore +++ b/.gitignore @@ -1,82 +1,8 @@ -### Laravel ### -/node_modules -/public/hot -/public/storage -/storage/*.key -/vendor -.env -.env.backup +build +composer.lock +docs +vendor +tests/Integration/temp .phpunit.result.cache -Homestead.json -Homestead.yaml -npm-debug.log -yarn-error.log - -### Linux ### -*~ - -# temporary files which can be created if a process still has a handle open of a deleted file -.fuse_hidden* - -# KDE directory preferences -.directory - -# Linux trash folder which might appear on any partition or disk -.Trash-* - -# .nfs files are created when an open file is removed but is still being accessed -.nfs* - -### macOS ### -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -### Windows ### -# Windows thumbnail cache files -Thumbs.db -Thumbs.db:encryptable -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk +.php-cs-fixer.cache +tests/temp/database.sqlite diff --git a/.styleci.yml b/.styleci.yml deleted file mode 100644 index 0285f17..0000000 --- a/.styleci.yml +++ /dev/null @@ -1 +0,0 @@ -preset: laravel diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1ac871c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,42 +0,0 @@ -language: php - -sudo: false - -notifications: - email: - on_success: never - on_failure: always - -matrix: - include: - - php: 7.2 - env: LARAVEL='6.*' TESTBENCH='4.*' COMPOSER_FLAGS='--prefer-lowest' - - php: 7.2 - env: LARAVEL='6.*' TESTBENCH='4.*' COMPOSER_FLAGS='--prefer-stable' - - php: 7.3 - env: LARAVEL='6.*' TESTBENCH='4.*' COMPOSER_FLAGS='--prefer-lowest' - - php: 7.3 - env: LARAVEL='6.*' TESTBENCH='4.*' COMPOSER_FLAGS='--prefer-stable' - - php: 7.4snapshot - env: LARAVEL='6.*' TESTBENCH='4.*' COMPOSER_FLAGS='--prefer-lowest' - - php: 7.4snapshot - env: LARAVEL='6.*' TESTBENCH='4.*' COMPOSER_FLAGS='--prefer-stable' - fast_finish: true - allow_failures: - - php: 7.4snapshot - -before_install: - - composer config discard-changes true - - composer validate --no-check-all --strict - - travis_retry composer self-update - - travis_retry composer require "laravel/framework:${LARAVEL}" "orchestra/testbench:${TESTBENCH}" --no-interaction --no-update - -install: - - travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction --no-suggest - - travis_retry composer require --dev satooshi/php-coveralls - -script: - - composer run phpunit -- --coverage-clover ./tests/logs/clover.xml - -after_script: - - php vendor/bin/php-coveralls -v diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..0588d63 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,20 @@ +# Changelog + +All notable changes to `laravel-helpers` will be documented in this file. + +## Version 1.1.0 +### Changed +- Transfer owner +- Improve tests + +## Version 1.0.3 +### Added +- Support Laravel 8 + +## Version 1.0.2 +### Added +- Code of Conduct +- Support Laravel 7 + +## Version 1.0.0 +- Initial release diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4da74e3..a93e16b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,55 +1,22 @@ # Contributing -Contributions are **welcome** and will be fully **credited**. +Contributions are welcome and will be fully credited. -Please read and understand the contribution guide before creating an issue or pull request. +Contributions are accepted via Pull Requests on [Github](https://github.com/wearedevtical/laravel-quran). -## Etiquette - -This project is open source, and as such, the maintainers give their free time to build and maintain the source code -held within. They make the code freely available in the hope that it will be of use to other developers. It would be -extremely unfair for them to suffer abuse or anger for their hard work. - -Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the -world that developers are civilized and selfless people. - -It's the duty of the maintainer to ensure that all submissions to the project are of sufficient -quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used. - -## Viability - -When requesting or submitting new features, first consider whether it might be useful to others. Open -source projects are used by many developers, who may have entirely different needs to your own. Think about -whether or not your feature is likely to be used by other users of the project. - -## Procedure - -Before filing an issue: - -- Attempt to replicate the problem, to ensure that it wasn't a coincidental incident. -- Check to make sure your feature suggestion isn't already present within the project. -- Check the pull requests tab to ensure that the bug doesn't have a fix in progress. -- Check the pull requests tab to ensure that the feature isn't already in progress. - -Before submitting a pull request: - -- Check the codebase to ensure that your feature doesn't already exist. -- Check the pull requests to ensure that another person hasn't already submitted the feature or fix. - -## Requirements - -If the project maintainer has any additional requirements, you will find them listed here. +## Pull Requests - **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer). - - **Add tests!** - Your patch won't be accepted if it doesn't have tests. - - **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. - - **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option. - - **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. - - **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting. +## Running Tests + +``` bash +$ phpunit +``` + **Happy coding**! diff --git a/LICENSE.md b/LICENSE.md index 427ac5e..ea78242 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) Wahyu Kristianto +Copyright (c) Devtical Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index c57f681..12823bb 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,12 @@ -

- Laravel Helpers -

- # Laravel Helpers -[![Build Status](https://travis-ci.org/kristories/laravel-helpers.svg?branch=master)](https://travis-ci.org/kristories/laravel-helpers) -[![styleci](https://styleci.io/repos/232460001/shield)](https://styleci.io/repos/232460001) -[![Coverage Status](https://coveralls.io/repos/github/Kristories/laravel-helpers/badge.svg?branch=master)](https://coveralls.io/github/Kristories/laravel-helpers?branch=master) -[![Packagist](https://img.shields.io/packagist/v/kristories/laravel-helpers.svg)](https://packagist.org/packages/kristories/laravel-helpers) -[![Packagist](https://poser.pugx.org/kristories/laravel-helpers/d/total.svg)](https://packagist.org/packages/kristories/laravel-helpers) -[![Packagist](https://img.shields.io/packagist/l/kristories/laravel-helpers.svg)](https://packagist.org/packages/kristories/laravel-helpers) - Helper Generator for Laravel ## Installation Install via composer ```bash -composer require kristories/laravel-helpers +composer require wearedevtical/laravel-helpers ``` #### Optional @@ -30,15 +19,29 @@ Publish the config by running the `php artisan vendor:publish` command. php artisan make:helper ``` +## Change log + +Please see the [changelog](CHANGELOG.md) for more information on what has changed recently. + +## Testing + +``` bash +$ composer test +``` + +## Contributing + +Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details. + ## Security -If you discover any security related issues, please email `w.kristories@gmail.com` instead of using the issue tracker. +If you discover any security related issues, please email author instead of using the issue tracker. ## Credits -- [Wahyu Kristianto](https://github.com/kristories) -- [All contributors](https://github.com/kristories/laravel-helpers/graphs/contributors) +- [Wahyu Kristianto](https://github.com/wearedevtical) +- [All contributors](https://github.com/wearedevtical/laravel-helpers/graphs/contributors) ## License -The MIT License (MIT). Please see [License File](LICENSE.md) for more information. +The MIT License (MIT). Please see the [license file](LICENSE.md) for more information. diff --git a/composer.json b/composer.json index 5f374c6..d3ad737 100644 --- a/composer.json +++ b/composer.json @@ -1,50 +1,50 @@ { - "name": "kristories/laravel-helpers", - "description": "Helper Generator for Laravel", - "license": "MIT", - "keywords": [ - "laravel", - "helper", - "generator" - ], - "type": "library", - "authors": [ - { - "name": "Wahyu Kristianto", - "email": "w.kristories@gmail.com" - } - ], - "require": { - "php": ">=7.2", - "illuminate/support": "^6.0|^7.0|^8.0" - }, - "require-dev": { - "orchestra/testbench": "^4.0", - "phpunit/phpunit": "^8.0" - }, - "autoload": { - "psr-4": { - "Kristories\\Helpers\\": "src" - } - }, - "autoload-dev": { - "psr-4": { - "Kristories\\Helpers\\Tests\\": "tests" - } - }, - "scripts": { - "phpunit": "phpunit" - }, - "extra": { - "laravel": { - "providers": [ - "Kristories\\Helpers\\ServiceProvider" - ] - } - }, - "config": { - "preferred-install": "dist", - "sort-packages": true, - "optimize-autoloader": true - } + "name": "wearedevtical/laravel-helpers", + "description": "Helper Generator for Laravel", + "license": "mit", + "authors": [ + { + "name": "Wahyu Kristianto", + "email": "w.kristories@gmail.com", + "homepage": "https://github.com/kristories" + } + ], + "homepage": "https://github.com/wearedevtical/laravel-helpers", + "keywords": [ + "laravel", + "helper", + "generator" + ], + "type": "library", + "require": { + "illuminate/support": "^6.0|^7.0|^8.0" + }, + "require-dev": { + "phpunit/phpunit": "~9.0", + "orchestra/testbench": "~5|~6", + "friendsofphp/php-cs-fixer": "^3.0" + }, + "autoload": { + "psr-4": { + "Devtical\\Helpers\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Devtical\\Helpers\\Tests\\": "tests" + } + }, + "extra": { + "laravel": { + "providers": [ + "Devtical\\Helpers\\HelperServiceProvider" + ] + } + }, + "scripts": { + "test": "phpunit", + "format": "vendor/bin/php-cs-fixer fix --allow-risky=yes" + }, + "minimum-stability": "dev", + "prefer-stable": true } diff --git a/phpunit.xml b/phpunit.xml deleted file mode 100644 index 5bb87ba..0000000 --- a/phpunit.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - tests - - - - - src - - - diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 0000000..94ea926 --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,13 @@ + + + + + src/ + + + + + tests + + + diff --git a/src/Console/Commands/HelperMakeCommand.php b/src/Console/Commands/HelperMakeCommand.php index 7d7e88f..9a09334 100644 --- a/src/Console/Commands/HelperMakeCommand.php +++ b/src/Console/Commands/HelperMakeCommand.php @@ -1,6 +1,6 @@ mergeConfigFrom( - self::CONFIG_PATH, - 'helper' - ); - - $files = glob( - app_path(config('helpers.directory', 'Helpers').'/*.php') - ); + $this->mergeConfigFrom(self::CONFIG_PATH, 'helper'); + $files = glob(app_path(config('helpers.directory', 'Helpers') . '/*.php')); foreach ($files as $file) { require_once $file; diff --git a/tests/HelpersTest.php b/tests/HelpersTest.php index cc561e5..a4f9e42 100644 --- a/tests/HelpersTest.php +++ b/tests/HelpersTest.php @@ -1,12 +1,11 @@ assertEquals(1, 1); } diff --git a/tests/TestCase.php b/tests/TestCase.php new file mode 100644 index 0000000..b7ae21c --- /dev/null +++ b/tests/TestCase.php @@ -0,0 +1,9 @@ +