Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Prepare develop branch to target PHP 7.2 #80

Merged
merged 35 commits into from
Nov 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
b3a3de7
Update dependencies
weierophinney Nov 19, 2018
7b6d85e
Add typehints wherever possible
weierophinney Nov 19, 2018
583cd24
Incorporate changes requested by @vaclavvanik
weierophinney Nov 20, 2018
722b1e4
Update mkdocs.yml
weierophinney Nov 20, 2018
0d07c0d
Adds phpstan into CI toolchain
weierophinney Nov 26, 2018
554d32d
Fix errors reported by phpstan
weierophinney Nov 26, 2018
553d40b
Versions documentation
weierophinney Nov 26, 2018
8ab8be9
Set explicit `object` param/return types in event implementations
weierophinney Nov 26, 2018
042ce54
Use `object` return type for `HydratorListener::onHydrate()`
weierophinney Nov 26, 2018
fbcbebf
Adds migration document for v3
weierophinney Nov 26, 2018
6334c28
Revert rename of `pages` to `nav` in `mkdocs.yml`
weierophinney Nov 26, 2018
e8cc238
Fix errors flagged by phpstan
weierophinney Nov 27, 2018
c867dc0
Use a dist file for phpstan
weierophinney Nov 27, 2018
60f8dc4
Do not iterate if value is null
weierophinney Nov 27, 2018
28d63e7
Use method_exists + is_callable
weierophinney Nov 27, 2018
a1225fd
Document all iterable and array parameters, return values, and proper…
weierophinney Nov 27, 2018
b81c4ac
Remove unnecessary whitespace in AggregateHydrator
weierophinney Nov 27, 2018
65a93dc
Use the IdentityNamingStrategy as a default naming strategy if none i…
weierophinney Nov 27, 2018
085c710
Import all global functions
weierophinney Nov 27, 2018
e3fafb1
Provide documentation for the HydratorPluginManagerFactory
weierophinney Nov 28, 2018
03c7599
Removes unused import in StrategyChain
weierophinney Nov 28, 2018
87d074b
Note that the `$hydrator` property is nullable in HydratorAwareTrait
weierophinney Nov 28, 2018
5e85841
Final CS pass
weierophinney Nov 28, 2018
deeaeef
Use PHP 7.3, not nightly, in test matrix
weierophinney Nov 28, 2018
4850813
Remove unnecessary ternary when setting `$explodeLimit`
weierophinney Nov 28, 2018
b6115d7
DomainException already implements ExceptionInterface
weierophinney Nov 28, 2018
800dc12
Remove unnecessary property declarations in HydratingArrayIterator
weierophinney Nov 28, 2018
7f62d77
Use null coalesce instead of ternary within ArrayMapNamingStrategy
weierophinney Nov 28, 2018
125194c
Use null coalesce within CompositeNamingStrategy instead of ternary
weierophinney Nov 28, 2018
33e18e1
Remove third argument to `substr` within UnderscoreToCamelCaseFilter
weierophinney Nov 28, 2018
b0babc4
Incorporate feedback from @webimpress
weierophinney Nov 28, 2018
046a2ea
Correct typehint for NamingStrategyInterface::extract `$object` argument
weierophinney Nov 28, 2018
1f2e3f7
Updates license docblocks for all test classes and assets
weierophinney Nov 28, 2018
e48e508
Remove `lcfirst` import in UnderscoreToCamelCaseFilter
weierophinney Nov 28, 2018
b7b5b9a
Sorting of imports when get_class/gettype are used
weierophinney Nov 28, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 9 additions & 28 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,59 +13,40 @@ env:

matrix:
include:
- php: 5.6
env:
- DEPS=lowest
- php: 5.6
env:
- DEPS=locked
- LEGACY_DEPS="phpunit/phpunit"
- php: 5.6
env:
- DEPS=latest
- php: 7
env:
- DEPS=lowest
- php: 7
env:
- DEPS=locked
- LEGACY_DEPS="phpunit/phpunit"
- php: 7
env:
- DEPS=latest
- php: 7.1
- php: 7.2
env:
- DEPS=lowest
- php: 7.1
- php: 7.2
env:
- DEPS=locked
- CS_CHECK=true
- TEST_COVERAGE=true
- php: 7.1
- STATIC_ANALYSIS=true
- php: 7.2
env:
- DEPS=latest
- php: 7.2
- php: 7.3
env:
- DEPS=lowest
- php: 7.2
- php: 7.3
env:
- DEPS=locked
- php: 7.2
- php: 7.3
env:
- DEPS=latest

before_install:
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi

install:
- travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs
- if [[ $LEGACY_DEPS != '' ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi
- travis_retry composer install $COMPOSER_ARGS
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi
- stty cols 120 && composer show

script:
- if [[ $STATIC_ANALYSIS == 'true' ]]; then composer analyse ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi
- if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi

Expand Down
23 changes: 13 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,23 @@
"forum": "https://discourse.zendframework.com/c/questions/components"
},
"require": {
"php": "^5.6 || ^7.0",
"zendframework/zend-stdlib": "^3.0"
"php": "^7.2",
"zendframework/zend-stdlib": "^3.2.1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mb_* functions are used (at least in UnderscoreNamingStrategy\CamelCaseToUnderscoreFilter.php)
Imo we should require ext-mbstring

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vaclavvanik
Please create a pull request and use the develop branch for your improvement. This PR is merged and finished.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i create it tomorrow. today i am sick :-/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We test to see if those functions are available before using them, defaulting to the non-mb variants if they are not. As such, there is no hard requirement on ext-mbstring.

},
"require-dev": {
"phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2",
"phpspec/prophecy": "^1.7.5",
"phpstan/phpstan": "^0.10.5",
"phpunit/phpunit": "^7.4.4",
"zendframework/zend-coding-standard": "~1.0.0",
"zendframework/zend-eventmanager": "^2.6.2 || ^3.0",
"zendframework/zend-serializer": "^2.6.1",
"zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3"
"zendframework/zend-eventmanager": "^3.2.1",
"zendframework/zend-modulemanager": "^2.8",
"zendframework/zend-serializer": "^2.9",
"zendframework/zend-servicemanager": "^3.3.2"
},
"suggest": {
"zendframework/zend-eventmanager": "^2.6.2 || ^3.0, to support aggregate hydrator usage",
"zendframework/zend-filter": "^2.6, to support naming strategy hydrator usage",
"zendframework/zend-serializer": "^2.6.1, to use the SerializableStrategy",
"zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3, to support hydrator plugin manager usage"
"zendframework/zend-eventmanager": "^3.2, to support aggregate hydrator usage",
"zendframework/zend-serializer": "^2.9, to use the SerializableStrategy",
"zendframework/zend-servicemanager": "^3.3, to support hydrator plugin manager usage"
},
"autoload": {
"psr-4": {
Expand Down Expand Up @@ -58,6 +60,7 @@
}
},
"scripts": {
"analyse": "phpstan analyse --no-progress",
"check": [
"@cs-check",
"@test"
Expand Down
Loading