Barry vd. Heuvel
12222b1901
Merge branch 'master' into feat-docblocks
2024-02-19 13:02:08 +01:00
Barry vd. Heuvel
02af2a278a
Merge reset/smart reset, don't set class ( #1523 )
...
* Merge reset/smart reset, don't set class
* Add changelog
2024-02-19 12:59:22 +01:00
Barry vd. Heuvel
d7ed749f3e
Use int/bool instead of longer variant ( #1524 )
...
* Use int/bool instead of longer variant
* Add changelog
* Update snapshots
2024-02-19 12:39:07 +01:00
Barry vd. Heuvel
76f27119d0
Update tests for int/bool
2024-02-18 13:28:53 +01:00
05259b695d
Add support for Laravel 11 ( #1520 )
...
* update dependencies
* Implement new methods for `Authenticatable` contract
* Added Laravel 11 to CI test target
* normalize composer.json
* Remove obsolete migration method (column type) from test
* Update snapshots
* Add changelog entry
* Update readme
---------
Co-authored-by: 武田 憲太郎 <[email protected] >
Co-authored-by: barryvdh <[email protected] >
2024-02-17 11:32:56 +01:00
6579c0332b
Remove doctrine ( #1512 )
...
* Remove doctrine
* Fix tests
* normalize composer.json
* Add back platform
* Bump integration versions
* composer fix-style
* Fix stability
* Bump minimum to 10.36
* Bump minimum to 10.38
* More types
* Fast fail off
* Bump docblock
* composer fix-style
* add bpchar
* Use match for type detection
Co-authored-by: Hafez Divandari <[email protected] >
* Use driverName
Co-authored-by: Hafez Divandari <[email protected] >
* fix match
* TWeak types
* Update snapshots
* Remove testbench 7
* composer fix-style
* Update src/Console/ModelsCommand.php
Co-authored-by: Hafez Divandari <[email protected] >
* Update src/Console/ModelsCommand.php
Co-authored-by: Hafez Divandari <[email protected] >
* Tweak bool
* Update src/Console/ModelsCommand.php
Co-authored-by: Hafez Divandari <[email protected] >
* composer fix-style
* Remove custom types, default to string
---------
Co-authored-by: barryvdh <[email protected] >
Co-authored-by: laravel-ide-helper <[email protected] >
Co-authored-by: Hafez Divandari <[email protected] >
2024-02-17 11:12:12 +01:00
Markus Podar and Barry vd. Heuvel
764bc02b84
[CODESTYLE] Replace phpcs with php-cs-fixer ( #1030 )
...
* composer require --dev friendsofphp/php-cs-fixer:^2
* php-cs-fixer: ignore cache and custom local config file
* php-cs-fixer: initial config
* php-cs-fixer: replace commands in composer
* php-cs-fixer: add PSR12 "as good as it currently gets"
* php-cs-fixer: apply PSR12 to codebase
* tests: add workaround to keep unused imports for snapshot testing
* php-cs-fixer: apply no_unused_imports
* php-cs-fixer: apply array_syntax short
* php-cs-fixer: apply single_quote
* php-cs-fixer: switch ordered_imports sort_algorithm to alpha
Let's be opinionated here for consistency
* php-cs-fixer: split between non-tests and tests and share config
* php-cs-fixer: apply declare_strict_types for tests
* php-cs-fixer: apply fully_qualified_strict_types
* php-cs-fixer: apply space_after_semicolon
* php-cs-fixer: apply trailing_comma_in_multiline_array
* php-cs-fixer: apply trim_array_spaces
* php-cs-fixer: apply unary_operator_spaces
* php-cs-fixer: apply whitespace_after_comma_in_array
* php-cs-fixer: apply native_function_invocation
* php-cs-fixer: apply concat_space
* grumphp: reflect we're using phpcsfixer now
* composer remove --dev squizlabs/php_codesniffer
* gha: simplify fix-style approach
Not really necessary to remove packages and then manually prevent
unrelated commits creeping in
Co-authored-by: Barry vd. Heuvel <[email protected] >
2020-09-01 11:32:31 +02:00
Barry vd. Heuvel
9599cfbbc9
Simplify test by mocking filesystem always ( #1019 )
2020-08-25 17:43:39 +02:00
Markus Podar
ac6fbffac3
tests: ensure output mocking is disabled so we can actually catch the output ( #1018 )
...
Discovered via https://github.com/barryvdh/laravel-ide-helper/pull/1017#issuecomment-679318764
This only happens if you run an artisan command _before_ `runCommand`,
but since every of these tests performs migrations, using artisan,
the mocked output instance is left behind and also affected us.
The call added in `runCommand` explicitly unregisters
`\Illuminate\Console\OutputStyle` and thus also throwing away possibly
mocked versions.
2020-08-25 06:29:44 +02:00
Markus Podar
ba95d18ef5
[PHPCS] Extend to check/fix all source code and turn GHA into auto-commit fixer ( #1003 )
...
* phpcs: enable also for config, resources and tests
* composer fix-style
* vendor/bin/phpunit -d --update-snapshots
* gha: instead of checking the style, fix and auto-commit it 💪
2020-08-10 10:22:48 +02:00
07d45d2d7a
switch tests to snapshot assertions ( #958 )
...
* install spatie/phpunit-snapshot-assertions
* switch GenerateBasicPhpdocFinal test to snapshot assertion
* use v3 of spatie/phpunit-snapshot-assertions to be PHP7.2 compatible
* add txt snapshot driver
* fix EloquentCommandTest
* replace all heredocs by snapshots
* make test compatible with old/deprecated versions
* Update composer.json
* normalize composer.json
* fix merge conflict
* Allow older snapshot versions
* normalize composer.json
Co-authored-by: Barry vd. Heuvel <[email protected] >
Co-authored-by: barryvdh <[email protected] >
2020-06-24 11:11:35 +02:00
Gabriel Langer
6f20800eef
[Model] Simplify full namespaces for already included resources ( #954 )
...
* Fixed #565 by using the imported class name if present. Fixed a bug where cast type was not properly added when the return type was found via phpdoc.
* Fixed errors with phpdocumentor/type-resolver:1.0
2020-06-20 12:53:36 +02:00
fgibaux
d35ea6e1d4
Decimal columns as string in Models ( #948 )
...
* Decimal columns as string in Models
To follow Eloquent casts
* update tests for decimals
2020-06-09 20:54:26 +02:00
Markus Podar
c0bb9ee1fd
Add more tests ( #870 )
...
* tests: be more systematic when testing discrete column types
Still not covering all due to SQLite limitation
* tests: relations of models
* tests: model in another namespace gets correctly qualified
* tests: cover SoftDeletes trait
* tests: cover some variants of getter
2020-01-03 23:08:24 +01:00
Markus Podar
d9a731daba
[TESTS] Add some basic tests for ModelsCommand ( #869 )
...
* tests: add abstract class for all database related tests
* tests: add abstract class for all ModelsCommand related tests
* tests: add GenerateBasicPhpdoc test
* tests: add CustomDate test
* tests: remove MITM abstract TestCaseDatabase, not useful here
* tests: skip new ModelsCommand test on Laravel < 6
* tests: remove CarbonImmutable checked
Since we decided to skip for Laravel < 6.0 anyway, it's always present
2020-01-03 09:52:10 +01:00