Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…erializer into feature/add-set-serialize-type-method
  • Loading branch information
Marcel Strahl committed Sep 17, 2020
2 parents b97d177 + 24cc934 commit 740da8e
Show file tree
Hide file tree
Showing 22 changed files with 3,873 additions and 1,882 deletions.
4 changes: 2 additions & 2 deletions .php_cs → .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ return PhpCsFixer\Config::create()
'array_syntax' => [
'syntax' => 'short',
],
'blank_line_after_opening_tag' => true,
'blank_line_after_opening_tag' => false,
'blank_line_before_statement' => true,
'cast_spaces' => true,
'concat_space' => [
Expand Down Expand Up @@ -78,4 +78,4 @@ return PhpCsFixer\Config::create()
'strict_comparison' => true,
'dir_constant' => true,
'psr4' => true,
])->setFinder($finder);
])->setFinder($finder);
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Marcel Strahl
Copyright (c) 2020 Marcel Strahl

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,13 @@ You are also welcome to use the Issue Tracker to set bugs, improvements or upgra

``` composer require dropelikeit/laravel-jms-serializer ```


### Support note

Laravel 5.* is no longer supported with release v2.0.0 and higher.

### How to use

Laravel 5.5 and later uses Package Auto-Discovery, so you do not need to add the service provider manually.
For Laravel versions below 5.5, the package must be added manually, add the following line in the "providers" array in config/app.php:

```php
Dropelikeit\LaravelJmsSerializer\ServiceProvider::class,
```
Laravel uses Package Auto-Discovery, so you do not need to add the service provider manually.

For example, to use the JMS serializer in a controller, add the ResponseFactory in the constructor.

Expand Down
18 changes: 13 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
}
],
"require": {
"illuminate/http": "^5.2|^6.0|^7.0",
"illuminate/support": "^5.2|^6.0|^7.0",
"illuminate/contracts": "^5.2|^6.0|^7.0",
"illuminate/http": "^6.0|^7.0",
"illuminate/support": "^6.0|^7.0",
"illuminate/contracts": "^6.0|^7.0",
"jms/serializer": "^3.4",
"doctrine/cache": "^1.10"
"doctrine/cache": "^1.10",
"php": "^7.3"
},
"autoload": {
"psr-4": {
Expand All @@ -36,16 +37,23 @@
}
},
"require-dev": {
"roave/security-advisories": "dev-master",
"friendsofphp/php-cs-fixer": "^2.16",
"phpunit/phpunit": "^8.5"
"phpunit/phpunit": "^9.3",
"nunomaduro/larastan": "^0.6.4",
"orchestra/testbench": "^4.0|^5.0",
"phpstan/phpstan-phpunit": "^0.12.16"
},
"scripts": {
"cs-check": "php-cs-fixer -v --dry-run --using-cache=no fix",
"cs-fix": "php-cs-fixer --using-cache=no fix",
"test": "phpunit",
"test-coverage": "phpunit --coverage-clover build/logs/clover.xml",
"analyze": "phpstan analyze --no-progress --memory-limit=-1",
"update-baseline": "phpstan analyze --generate-baseline --memory-limit=-1",
"check": [
"@cs-check",
"@analyze",
"@test",
"@test-coverage"
]
Expand Down
Loading

0 comments on commit 740da8e

Please sign in to comment.