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

Hydrator Strategy to extract and hydrate Boolean values #6523

Closed
wants to merge 367 commits into from
Closed
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
367 commits
Select commit Hold shift + click to select a range
511496c
Added test for setting label position via __invoke()
Martin-P Mar 5, 2014
cc4126f
Fixed typo in test
Martin-P Mar 5, 2014
8ffc1e6
Updated __invoke() to not cache label position parameter
Martin-P Mar 5, 2014
34a4a43
Removed test for setting permanent label position via __invoke()
Martin-P Mar 5, 2014
9c4b8a8
Fixed rebase conflicts
Martin-P Apr 4, 2014
a9e6c76
Fixed typo
Martin-P Apr 4, 2014
2bd4afe
Accidently removed line while fixing conflicts
Martin-P Apr 5, 2014
391b1ef
Removed a newline at end of file
Martin-P Apr 5, 2014
72bd9a2
Merge branch 'feature/#5742-#5699-disable-label-position-caching' int…
Ocramius Apr 14, 2014
e076bd5
Merge branch 'hotfix/#6132-form-element-manager-only-initialize-share…
Ocramius Apr 14, 2014
0fffc2c
Forward port #6086
Apr 14, 2014
52f5439
Merge branch 'cs/#5029-imports-fqcn-not-prefixed-with-global-ns' into…
Ocramius Apr 14, 2014
0551173
Merge branch 'hotfix/6139' into develop
weierophinney Apr 15, 2014
c837d6e
Merge branch 'hotfix/6140' into develop
weierophinney Apr 15, 2014
64e99c0
Merge branch 'security/zf2014-03' into develop
weierophinney Apr 15, 2014
cb75ac6
Merge branch 'releases/2.3.1' into develop
weierophinney Apr 15, 2014
7b0e984
Merge branch 'release/bump' into develop
weierophinney Apr 15, 2014
de53b9a
Add hydratedMethodName private member to optimize the hydrate() metho…
moderndeveloperllc Apr 15, 2014
6b25870
Remove unused variable.
moderndeveloperllc Apr 15, 2014
3547392
Merge branch 'Ocramius-hotfix/session-validation-listeners-null-retur…
Apr 16, 2014
fb5e8e8
Merge branch 'ralphschindler-hotfix/5794' into develop
ezimuel Apr 16, 2014
53f16f2
Merge branch 'hotfix/6141' into develop
weierophinney Apr 16, 2014
9efe720
Merge branch 'hotfix/6146' into develop
weierophinney Apr 16, 2014
ae253be
Merge branch 'hotfix/6144' into develop
weierophinney Apr 16, 2014
6ecf218
Properly pass context to input filter
bakura10 Apr 17, 2014
78bb5e3
Merge pull request #6154 from bakura10/use-input-filter-context
weierophinney Apr 17, 2014
9459b77
[#6154] Added note to README
weierophinney Apr 17, 2014
bb30e51
Merge branch 'feature/6154' into develop
weierophinney Apr 17, 2014
58c1b3f
Fix for 6151 - Match patterns now look for any non-whitespace charact…
moderndeveloperllc Apr 17, 2014
27d0ff1
Merge branch 'hotfix/#6158-typo-fix' into develop
Ocramius Apr 18, 2014
f31d81c
Merge pull request #6163 in develop
Maks3w Apr 22, 2014
1edb6c2
Merge pull request #6159 in develop
Maks3w Apr 22, 2014
149ec69
Merge pull request #6149 in develop
Maks3w Apr 22, 2014
c579300
Merge pull request #6180 in develop
Maks3w Apr 23, 2014
b37355e
Merge pull request #6164 in develop
Maks3w Apr 23, 2014
76ef0c0
Merge pull request #6186 in develop
Maks3w Apr 24, 2014
535940f
Merge branch 'tommyseus-randgetinteger' into develop
ezimuel Apr 24, 2014
ef1c68d
Merge pull request #6191 in develop
Maks3w Apr 25, 2014
c98907d
Added posibility to render view with short reference.
vnagara Apr 25, 2014
8e87137
Add docblock. Made access to protected.
vnagara Apr 27, 2014
4e10322
Clean up repeat code by using already implemented AbstractListenerAgg…
Apr 29, 2014
4454876
Merge branch 'cleanup/#6203-abstract-aggregate-listener-reuse' into d…
Ocramius Apr 29, 2014
3018a30
Merge branch 'hotfix/#6151-separator-to-camel-case-filter-on-any-non-…
Ocramius Apr 29, 2014
08bbf62
Merge branch 'cs/#6177-log-processor-tests-indentation-cs' into develop
Ocramius Apr 29, 2014
778d429
Merge branch 'typo/#6178-c-p-mistake-in-processorpluginmanager' into …
Ocramius Apr 29, 2014
28bb9b6
Merge branch 'cs/#6179-logger-indentation-and-trailing-commas' into d…
Ocramius Apr 29, 2014
1dbdacb
Merge branch 'feature/#6187-homepage-link-for-component-composer-json…
Ocramius Apr 29, 2014
8e88356
Merge branch 'hotfix/#6200-restore-libxml-entity-loader-in-soap-serve…
Ocramius Apr 29, 2014
4ffd482
Reduced code duplication
pszczekutowicz Apr 1, 2014
8e5d052
Tests for methods with new $namespace parameter
pszczekutowicz Apr 3, 2014
2e31a40
Merge branch 'feature/#6073-explicit-namespacing-in-flashmessenger' i…
Ocramius Apr 29, 2014
0dd1a89
Added tests
vnagara Apr 29, 2014
820cfcd
Merge branch 'hotfix/#5962-mime-empty-string-on-no-part' into develop
Ocramius Apr 30, 2014
8a52e80
Merge branch 'hotfix/#6207-underscore-naming-strategy-not-studlycase'…
Ocramius Apr 30, 2014
be64022
Merge branch 'typo/#6213-typo-fix' into develop
Ocramius May 1, 2014
ade0734
* added MutableCreationOptionsAwareTrait
demichl68 Apr 23, 2014
02c4a85
Update MutableCreationOptionsAwareTrait.php
demichl68 Apr 23, 2014
fef8e73
Create MutableCreationOptionsAwareTraitTest.php
demichl68 Apr 23, 2014
63abdd8
Update MutableCreationOptionsAwareTraitTest.php
demichl68 Apr 23, 2014
2e88f3e
Update MutableCreationOptionsAwareTraitTest.php
demichl68 Apr 23, 2014
9ba40d5
Update MutableCreationOptionsAwareTrait.php
demichl68 Apr 23, 2014
733bf7a
* fixed array notation
demichl68 Apr 24, 2014
a8e8973
* improved options array readability
demichl68 Apr 25, 2014
a1e3d99
* fixed @requires annotation
demichl68 Apr 29, 2014
fe56890
* explicitly skipping unit tests on PHP Version < 5.4 as "@require" …
demichl68 Apr 29, 2014
79e43b2
* removed "Aware" from Classname
demichl68 Apr 29, 2014
50ccaf2
Merge branch 'feature/mutable-creation-options-traits' into develop
Ocramius May 2, 2014
27b5d35
Merge branch 'typo/#6215-console-adapter-typo' into develop
Ocramius May 2, 2014
b90e5a8
Created log filter for filtering log events based on the time when th…
nikolaposa Mar 29, 2014
a98b1ae
Fixing trailing spaces in Timestamp log filter.
nikolaposa Mar 29, 2014
a3cbe41
Fixing EOF line in Timestamp log filter.
nikolaposa Mar 29, 2014
bdab4f2
Added missing license headers. Removing redundant else statement.
nikolaposa Mar 29, 2014
14e4544
Fixing trailing spaces in Timestamp log filter.
nikolaposa Mar 29, 2014
448ec84
Added validation for the Timestamp log filter comparion operator.
nikolaposa Apr 3, 2014
fbfc94f
Fixed initialization of the Timestamp log filter operator parameter. …
nikolaposa Apr 14, 2014
dfe05b0
#6058 - Correct namespacing of `@expectedException` symbols
Ocramius May 3, 2014
504de00
#6058 - Verifying that a timestamp filter can be built from a travers…
Ocramius May 3, 2014
c803f8b
#6058 - importing undefined symbol `Traversable`
Ocramius May 3, 2014
67500b6
#6058 - Preferring `ArrayUtils::iteratorToArray()` over `iterator_to_…
Ocramius May 3, 2014
f042772
#6058 - Removing unused casting and variable initialization
Ocramius May 3, 2014
bebd945
#6058 - Adding tests to verify that messages without a datetime are d…
Ocramius May 3, 2014
0428621
#6058 - Timestamp filter is now skipping events without a timestamp
Ocramius May 3, 2014
d4f323f
#6058 - Moving ignored messages to a data provider
Ocramius May 3, 2014
d781786
#6058 - Adding tests to verify support for integer and string timestamps
Ocramius May 3, 2014
00f4982
#6058 - Moving data provider to the bottom of the test
Ocramius May 3, 2014
cf4d725
#6058 - Timestamp tests should not use hardcoded (hard to read) times…
Ocramius May 3, 2014
1257983
#6058 - Removing value from ignored timestamps (strings) should be ch…
Ocramius May 3, 2014
3043452
#6058 - Timestamp filter now also checks integers and strings
Ocramius May 3, 2014
b3e0c40
#6058 - Adding coverage annotation, removing \`@group\` annotation
Ocramius May 3, 2014
c343f08
Merge branch 'feature/#6058-timestamp-log-filter' into develop
Ocramius May 3, 2014
20bf722
Merge branch 'typo/#6217-callback-paginator-test-typos' into develop
Ocramius May 5, 2014
dec0394
[travis] Adds hhvm-nightly
Maks3w May 4, 2014
4cf9a06
Merge branch 'feature/#6216-travis-build-hhvm-nightly' into develop
Ocramius May 5, 2014
2b9642c
Move logic to new RelativeFallbackResolver
vnagara May 6, 2014
2f8287c
Fix misspelling
vnagara May 6, 2014
c14f53f
Add docblock param to constructor
vnagara May 6, 2014
a31bec5
Fix return type
May 7, 2014
deff9a2
Merge pull request #6232
Maks3w May 7, 2014
f7ecca8
Merge branch 'hotfix/6219' into develop
weierophinney May 7, 2014
c21facf
Remade resolver to clear fallback and using it coupling with Aggragat…
vnagara May 7, 2014
556df54
Merge pull request #6237 in develop
Maks3w May 7, 2014
0e4c955
Refactor by removing 1 check.
vnagara May 8, 2014
d58c01b
#6142 - using `string[]` instead of `array` for the hydrated method n…
Ocramius May 9, 2014
95d7048
#6142 - better description of what the hydration method names cache does
Ocramius May 9, 2014
566c92b
#6142 - better hydration cache property name
Ocramius May 9, 2014
ff0b06d
#6142 - adding tests to verify that the `ClassMethods` hydrator can a…
Ocramius May 9, 2014
31296ba
#6142 - Caching the hydration methods per class to avoid calling non-…
Ocramius May 9, 2014
ae6138b
#6142 - Stubbing out structure of an extraction methods cache
Ocramius May 9, 2014
5c9abf5
#6142 - Implementing more performing extraction via an extraction map…
Ocramius May 10, 2014
fb0f2f4
#6142 - Hydration caches should be reset when filters/strategies are …
Ocramius May 10, 2014
88bf584
#6142 - Adding minor comments to distinguish various portions of the …
Ocramius May 10, 2014
f7e39ca
Merge pull request #1 from Ocramius/feature/#6142-classmethod-hydrato…
moderndeveloperllc May 10, 2014
3d783c0
Use substr instead of regex
staabm May 10, 2014
db6bda4
Fixed CS
staabm May 10, 2014
0186a20
Use strpos instead of substr.
staabm May 10, 2014
16b3c36
Merge branch 'hotfix/#6245-invalid-date-step-error-with-dst' into dev…
Ocramius May 10, 2014
c8d78ff
Merge branch 'feature/#6142-setter-matching-performance' into feature…
Ocramius May 10, 2014
69cd791
Merge branch 'feature/#6142-classmethod-hydrator-optimization' into d…
Ocramius May 10, 2014
f6d3b89
Removed unnecessary assignment. FallbackResolver wraps entire Aggraga…
vnagara May 10, 2014
c0fa304
Merge branch 'cs/abstract-controller-test-case-closure-braces' into d…
Ocramius May 12, 2014
122c1cd
Merge branch 'hotfix/6033' into develop
weierophinney May 12, 2014
8d5a9db
Fix infinite recursion. Revert to wrap evry resolver.
vnagara May 13, 2014
d346f9c
HTML5 compliant form attributes
May 13, 2014
0e064e3
Use of Zend\View\Helper\Doctype constants
May 13, 2014
03f3602
#6271 - avoiding `else` clauses where possible
Ocramius May 15, 2014
2f75195
#6271 - better conditional
Ocramius May 15, 2014
438fe5e
Merge branch 'hotfix/#6271-default-form-tag-action-and-method' into d…
Ocramius May 15, 2014
ada5dba
Merge branch 'hotfix/#6184-deprecated-mongodb-flags-replacement' into…
Ocramius May 15, 2014
7382d34
Merge branch 'doc/#6254-per-component-contributing.md' into develop
Ocramius May 15, 2014
5451a95
Merge branch 'hotfix/#6223-soap-registration-of-complex-type' into de…
Ocramius May 15, 2014
dde042f
Digit filter should not touch boolean
May 15, 2014
ec6dfa9
Early return for int values which are always just digits
May 15, 2014
f42f0f0
Merge branch 'hotfix/#6261-string-trim-allows-0-in-charlist' into dev…
Ocramius May 18, 2014
b5275cd
#6196 - adding missing coverage annotations
Ocramius May 18, 2014
9e26b10
#6196 - completely importing dependencies
Ocramius May 18, 2014
23dfb36
#6196 - minor CS fixes - removing useless imports
Ocramius May 18, 2014
2f264fd
#6196 - fixed unresolved referenced symbol
Ocramius May 18, 2014
0cf1395
#6196 - adding missing hints
Ocramius May 18, 2014
1a48de2
#6196 - Reverting feedback of zendframework/zendframework@c98907d
Ocramius May 18, 2014
8df959c
#6196 - Removing unused docblock
Ocramius May 18, 2014
4e69733
#6196 - Adding docblock describing the purpose of the relative fallba…
Ocramius May 18, 2014
d426a05
#6196 - The fallback resolver should ignore unknown view renderer types
Ocramius May 18, 2014
39f27ee
#6196 - The fallback resolver should ignore renderers that don't prov…
Ocramius May 18, 2014
297baf7
#6196 - Fallback resolver skips on invalid `view_model` plugin type
Ocramius May 18, 2014
0a7f309
#6196 - Fallback resolver skips should skip when no view model is cur…
Ocramius May 18, 2014
eea8e6b
#6196 - Fallback resolver skips when no view model is currently set
Ocramius May 18, 2014
92f98db
#6196 - CS - wrong type hints, removing unused assignment
Ocramius May 18, 2014
dd79150
#6196 - CS - using `call_user_func` to actually use the callable that…
Ocramius May 18, 2014
9d1dc8b
#6196 - Inlining wrapped resolver call
Ocramius May 18, 2014
faf4541
Merge branch 'feature/#6196-subpath-fallback-resolver' into develop
Ocramius May 18, 2014
0a2cfe1
#6196 - fixed coverage annotation referencing non existing class
Ocramius May 18, 2014
40148c3
Merge branch 'cs/#6038-headlink-docblock-optional-params-hinting' int…
Ocramius May 20, 2014
d65e46b
Merge branch 'hotfix/#6277-digit-filter-should-ignore-booleans' into …
Ocramius May 20, 2014
3509e7a
Merge branch 'hotfix/#6303-fix-#5144-ttl-tests-stability' into develop
Ocramius May 20, 2014
d270f73
Merge branch 'hotfix/#6266-delegator-support-in-mvc-service-config' i…
Ocramius May 20, 2014
1466294
Merge branch 'typo/#6325-session-exception-typo' into develop
Ocramius May 26, 2014
ebd07fa
Merge branch 'DASPRiD-bugfix/merging-inputs-with-allow-empty' into de…
ezimuel May 28, 2014
d77b1ce
Merge branch 'hotfix/6333' into develop
weierophinney Jun 12, 2014
e7f1461
Merge branch 'eiwaen-bugfix/6377' into develop
ezimuel Jun 17, 2014
de1e4e5
Added the file encryption/decryption to Zend\Crypt
ezimuel Jul 3, 2014
4cff5d8
Added the SymmetricInterface to setCipher()
ezimuel Jul 3, 2014
fcbf82b
Added a checkFileInOut() to check files for encryption/decryption + m…
ezimuel Jul 3, 2014
6418c25
Minor fixes
ezimuel Jul 3, 2014
f64ccd4
Merge branch 'feature/#6438-new-file-encrypt' into develop
Ocramius Jul 3, 2014
f1d9a05
Merge branch 'hotfix/6446' into develop
weierophinney Jul 21, 2014
0fe9823
fix current() and add Iterator
turrsis May 8, 2014
94fcfb0
fix performance
turrsis May 8, 2014
612d3e4
add test
turrsis May 8, 2014
553e0a1
Merge branch 'hotfix/#6242-stdlib/PriorityList/fixCurrentAndIterator'…
Ocramius Jul 27, 2014
15c01fd
Separate address list logic
davidwindell May 13, 2014
9c11308
Merge branch 'feature/#6268-addresslist-from-string' into develop
Ocramius Jul 27, 2014
ffeb9c9
Fixes #6274 added proper support for constants
steverhoades May 15, 2014
6f84d62
coding standard fix
steverhoades May 16, 2014
a866754
#6288 - adding a bit of spacing - helps readability
Ocramius Jul 27, 2014
38aa7d9
#6288 - adding spaces around `if` as of PSR-2
Ocramius Jul 27, 2014
b666829
#6288 - clarifying on returned indexes
Ocramius Jul 27, 2014
8504967
#6288 - adding spacing, avoiding `elseif`
Ocramius Jul 27, 2014
69f23be
#6288 - more specific parameter hinting for `addConstants`
Ocramius Jul 27, 2014
251b5bd
#6288 - removing useless checks
Ocramius Jul 27, 2014
10b51da
#6288 - cleanups, removal of unused `empty()` checks
Ocramius Jul 27, 2014
fc94ecc
#6288 - cleaning up assertions, using correct assertions for counts, …
Ocramius Jul 27, 2014
053237d
Merge branch 'hotfix/#6288-fix-#6274-proper-zend-code-constant-suppor…
Ocramius Jul 27, 2014
2c9bde4
updated AbstractHttpControllerTestCase to show actual contents of nod…
scroach May 20, 2014
4664de0
#6296 - cleaning up, more spacing, avoiding unused variables
Ocramius Jul 27, 2014
8342650
Merge branch 'feature/#6296-phpunit-assert-show-contents' into develop
Ocramius Jul 27, 2014
c6e256d
Merge branch 'hotfix/#6310-fix-#6293-zend-barcode-dependencies' into …
Ocramius Jul 27, 2014
d2df3fd
Merge branch 'hotfix/#6318-fix-#6315-add-body-to-curl-delete-request'…
Ocramius Jul 27, 2014
307e674
Zend\Code\Generator\MethodGenerator now accepts parameter as array
denisatsqnp Jun 27, 2014
3bd7a91
Reverting mode from 0755 to 0644
Ocramius Jul 27, 2014
6dac6e9
#6422 - minor CS fixes (spacing, alignment)
Ocramius Jul 27, 2014
1edb086
#6422 - avoiding excessive `elseif`, removing redundant variable
Ocramius Jul 27, 2014
8ca4540
#6422 - adding more spacing, adding docblocks
Ocramius Jul 27, 2014
73ca0ee
#6422 - adding test case for the studly case naming strategy
Ocramius Jul 27, 2014
623b05c
Merge branch 'hotfix/#6422-fix-#6420-methodgenerator-accepting-array-…
Ocramius Jul 27, 2014
6b74068
Enable trace error by default
blanchonvincent Apr 8, 2014
32182a1
Merge branch 'feature/#6108-zend-test-trace-error-display-enable' int…
Ocramius Jul 27, 2014
82fe143
improved xml formatter for extra array data
dkemper Apr 14, 2014
f39f989
removed slash from Traversable
dkemper Apr 14, 2014
9c681d0
changed dom creation type
dkemper Apr 14, 2014
5102439
added nested array handling for extra data
dkemper Apr 15, 2014
2a67925
added tests, modified docs, improved error handling on wrong tag names
dkemper Apr 17, 2014
8d21caa
#6137 - reducing nesting level
Ocramius Jul 27, 2014
8305e7f
#6137 - minor cleanups, removing useless `else` block
Ocramius Jul 27, 2014
1458024
#6137 - avoiding `elseif` where not needed
Ocramius Jul 27, 2014
66443a8
#6137 - simplified return value for the generated XML, avoiding writi…
Ocramius Jul 27, 2014
cfb4557
#6137 - simplified ternary, alignment, spacing
Ocramius Jul 27, 2014
05e0382
#6137 - swapping type checks to reduce overhead
Ocramius Jul 27, 2014
bf2d0d3
Merge branch 'feature/#6137-formatter-xml-extra-improvement' into dev…
Ocramius Jul 27, 2014
4e89510
Fix pattern for mobile phone number
neilime Apr 18, 2014
146b50f
Improve test for FR mobile phone number validator
neilime Apr 30, 2014
bec09b5
Update FR.php
neilime Apr 30, 2014
db18d96
Merge branch 'hotfix/#6161-too-long-mobile-phone-numbers-fix' into de…
Ocramius Jul 27, 2014
f58ee90
Use data provider in PhoneNumberTest.
jmleroux Jun 19, 2014
507ed15
Merge branch 'hotfix/#6396-phone-number-tests-with-provider' into dev…
Ocramius Jul 27, 2014
f15c71b
Merge branch 'hotfix/#6170-zend-xml-dependency-for-zend-xmlrpc' into …
Ocramius Jul 27, 2014
60fc7a7
Enhancement: Do not overwrite requestId if extra already has one
localheinz Apr 23, 2014
5869e9b
Merge branch 'feature/#6178-do-not-overwrite-request-id' into develop
Ocramius Jul 27, 2014
8d40fec
Merge branch 'hotfix/#6462-fix-phpcs-reported-errors' into develop
Ocramius Jul 27, 2014
5002db2
Enhancement: Introduce ReferenceId processor
localheinz Apr 23, 2014
2f885cd
Enhancement: Register ReferenceId processor in ProcessorPluginManager
localheinz Apr 24, 2014
24ed241
#6183 - minor code cleanups - avoiding redundant vars
Ocramius Jul 27, 2014
4b5ff8b
Merge branch 'feature/#6183-reference-id-processor' into develop
Ocramius Jul 28, 2014
b163d2f
Merge branch 'feature/#6205-autoload-dev' into develop
Ocramius Jul 28, 2014
0f3bf21
Add clearByPrefix to Redis Cache Storage
vahid-sohrabloo May 11, 2014
4386d1b
Merge branch 'feature/#6252-redis-cache-storage-clear-by-prefix' into…
Ocramius Jul 28, 2014
0625b71
Merge branch \hotfix/#6283-fix-#6253-zend-code-methodgenerator-catch-…
Ocramius Jul 28, 2014
2f416ce
Changing self:: to static:: to allow for custom authentication types …
tklever May 20, 2014
d0d9ac2
Unit test for self:: to static:: Http\Client update
tklever May 28, 2014
4e44671
#6301 - adding some spacing while checking logic
Ocramius Jul 28, 2014
f5ea706
#6301 - adding assertion for auth type state being set
Ocramius Jul 28, 2014
d904f43
Merge branch 'feature/#6301-http-auth-uses-static-for-constants' into…
Ocramius Jul 28, 2014
dae42ac
Merge branch 'hotfix/#6302-fix-#4747-file-generator-properly-generate…
Ocramius Jul 28, 2014
8f7416f
Change "Unknown Error" with current internal list of messages
samsonasik May 24, 2014
bc9a064
Merge branch 'hotfix/#6322-change-xmlrpc-unknown-error-message' into …
Ocramius Jul 28, 2014
46bbcee
Merge branch 'hotfix/#6326-thousand-separator-in-number-validator' in…
Ocramius Jul 28, 2014
81908f8
Merge branch 'cleanup/#6336-link-mediatype-references' into develop
Ocramius Jul 28, 2014
d096678
Merge branch 'hotfix/#6351-license-header' into develop
Ocramius Jul 28, 2014
9cdff21
Merge branch 'hotfix/#6361-fix-#6281-mongodb-saveoptions-not-recogniz…
Ocramius Jul 28, 2014
cb91dde
Remove trailing whitespaces
rahuldroy Jul 28, 2014
fc50881
Merge branch 'hotfix/#6487-trailing-spaces-removal-hotfix' into develop
Ocramius Jul 28, 2014
548e7cc
Merge branch 'hotfix/6510' into develop
weierophinney Aug 4, 2014
e971a32
Merge branch 'hotfix/cs-overzealousness' into develop
weierophinney Aug 4, 2014
2cf3fb3
Hydrator Strategy to extract and hydrate Boolean values
Aug 4, 2014
ce2322d
Added Class comment
Aug 5, 2014
b4ab427
Check if parameters in Constructor is int or string
Aug 5, 2014
28129b0
Removed Getter Methods getTrueValue and getFalseValue
Aug 5, 2014
f3c01ae
Fixed alignment
Aug 5, 2014
0e82f0b
Added cover annotations for Test Cases
Aug 5, 2014
ed1c2d2
Optimized condition
Aug 5, 2014
e21af0b
Fixed doc blocks
Aug 6, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .travis.yml
Expand Up @@ -6,6 +6,7 @@ php:
- 5.5
- 5.6
- hhvm
- hhvm-nightly

install:
- sudo apt-get install parallel
Expand Down Expand Up @@ -33,3 +34,4 @@ matrix:
fast_finish: true
allow_failures:
- php: hhvm
- php: hhvm-nightly
17 changes: 12 additions & 5 deletions README.md
@@ -1,4 +1,4 @@
### Welcome to the *Zend Framework 2.3* Release!
### Welcome to the *Zend Framework 2.4* Release!

Master:
[![Build Status](https://secure.travis-ci.org/zendframework/zf2.png?branch=master)](http://travis-ci.org/zendframework/zf2)
Expand All @@ -9,13 +9,20 @@ Develop:

## RELEASE INFORMATION

*Zend Framework 2.3.2dev*
*Zend Framework 2.4.0dev*

This is the second maintenance release for the version 2.3 series.
This is the fourth minor (feature) release for the version 2 series.

DD MMM YYYY
DD MMM YYY

### UPDATES IN 2.3.2
### UPDATES IN 2.4.0

- [#6154](https://github.com/zendframework/zf2/pull/6154) updates
`Zend\InputFilter\BaseInputFilter::isValid()` to accept an optional `$context`
parameter; if used, this value will be passed to all composed inputs as
context, instead of the value provided to `setData()`. For classes overriding
the `isValid()` method of an InputFilter, you will need to add
`$context = null` as an argument.

Please see [CHANGELOG.md](CHANGELOG.md).

Expand Down
28 changes: 28 additions & 0 deletions library/Zend/Cache/Storage/Adapter/Redis.php
Expand Up @@ -13,12 +13,14 @@
use RedisException as RedisResourceException;
use stdClass;
use Traversable;
use Zend\Cache\Storage\ClearByPrefixInterface;
use Zend\Cache\Exception;
use Zend\Cache\Storage\Capabilities;
use Zend\Cache\Storage\FlushableInterface;
use Zend\Cache\Storage\TotalSpaceCapableInterface;

class Redis extends AbstractAdapter implements
ClearByPrefixInterface,
FlushableInterface,
TotalSpaceCapableInterface
{
Expand Down Expand Up @@ -370,6 +372,32 @@ public function flush()
}
}

/* ClearByPrefixInterface */

/**
* Remove items matching given prefix
*
* @param string $prefix
* @return bool
*/
public function clearByPrefix($prefix)
{
$redis = $this->getRedisResource();

$prefix = (string) $prefix;
if ($prefix === '') {
throw new Exception\InvalidArgumentException('No prefix given');
}

$options = $this->getOptions();
$namespace = $options->getNamespace();
$prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator() . $prefix;

$redis->delete($redis->keys($prefix.'*'));

return true;
}

/* TotalSpaceCapableInterface */

/**
Expand Down
174 changes: 161 additions & 13 deletions library/Zend/Code/Generator/ClassGenerator.php
Expand Up @@ -56,6 +56,11 @@ class ClassGenerator extends AbstractGenerator
*/
protected $properties = array();

/**
* @var PropertyGenerator[] Array of constants
*/
protected $constants = array();

/**
* @var MethodGenerator[] Array of methods
*/
Expand All @@ -74,7 +79,6 @@ class ClassGenerator extends AbstractGenerator
*/
public static function fromReflection(ClassReflection $classReflection)
{
// class generator
$cg = new static($classReflection->getName());

$cg->setSourceContent($cg->getSourceContent());
Expand All @@ -93,11 +97,12 @@ public static function fromReflection(ClassReflection $classReflection)

/* @var \Zend\Code\Reflection\ClassReflection $parentClass */
$parentClass = $classReflection->getParentClass();
$interfaces = $classReflection->getInterfaces();

if ($parentClass) {
$cg->setExtendedClass($parentClass->getName());
$interfaces = array_diff($classReflection->getInterfaces(), $parentClass->getInterfaces());
} else {
$interfaces = $classReflection->getInterfaces();

$interfaces = array_diff($interfaces, $parentClass->getInterfaces());
}

$interfaceNames = array();
Expand All @@ -109,20 +114,36 @@ public static function fromReflection(ClassReflection $classReflection)
$cg->setImplementedInterfaces($interfaceNames);

$properties = array();

foreach ($classReflection->getProperties() as $reflectionProperty) {
if ($reflectionProperty->getDeclaringClass()->getName() == $classReflection->getName()) {
$properties[] = PropertyGenerator::fromReflection($reflectionProperty);
}
}

$cg->addProperties($properties);

$constants = array();

foreach ($classReflection->getConstants() as $name => $value) {
$constants[] = array(
'name' => $name,
'value' => $value
);
}

$cg->addConstants($constants);

$methods = array();

foreach ($classReflection->getMethods() as $reflectionMethod) {
$className = ($cg->getNamespaceName())? $cg->getNamespaceName() . "\\" . $cg->getName() : $cg->getName();
$className = ($cg->getNamespaceName()) ? $cg->getNamespaceName() . "\\" . $cg->getName() : $cg->getName();

if ($reflectionMethod->getDeclaringClass()->getName() == $className) {
$methods[] = MethodGenerator::fromReflection($reflectionMethod);
}
}

$cg->addMethods($methods);

return $cg;
Expand Down Expand Up @@ -414,6 +435,114 @@ public function getImplementedInterfaces()
return $this->implementedInterfaces;
}

/**
* @param string $constantName
*
* @return PropertyGenerator|false
*/
public function getConstant($constantName)
{
if (isset($this->constants[$constantName])) {
return $this->constants[$constantName];
}

return false;
}

/**
* @return PropertyGenerator[] indexed by constant name
*/
public function getConstants()
{
return $this->constants;
}

/**
* @param string $constantName
* @return bool
*/
public function hasConstant($constantName)
{
return isset($this->constants[$constantName]);
}

/**
* Add constant from PropertyGenerator
*
* @param PropertyGenerator $constant
* @throws Exception\InvalidArgumentException
* @return ClassGenerator
*/
public function addConstantFromGenerator(PropertyGenerator $constant)
{
$constantName = $constant->getName();

if (isset($this->constants[$constantName])) {
throw new Exception\InvalidArgumentException(sprintf(
'A constant by name %s already exists in this class.',
$constantName
));
}

if (! $constant->isConst()) {
throw new Exception\InvalidArgumentException(sprintf(
'The value %s is not defined as a constant.',
$constantName
));
}

$this->constants[$constantName] = $constant;

return $this;
}

/**
* Add Constant
*
* @param string $name
* @param string $value
* @throws Exception\InvalidArgumentException
* @return ClassGenerator
*/
public function addConstant($name, $value)
{
if (!is_string($name)) {
throw new Exception\InvalidArgumentException(sprintf(
'%s expects string for name',
__METHOD__
));
}

if (empty($value) || !is_string($value)) {
throw new Exception\InvalidArgumentException(sprintf(
'%s expects value for constant, value must be a string',
__METHOD__
));
}

return $this->addConstantFromGenerator(new PropertyGenerator($name, $value, PropertyGenerator::FLAG_CONSTANT));
}

/**
* @param PropertyGenerator[]|array[] $constants
*
* @return ClassGenerator
*/
public function addConstants(array $constants)
{
foreach ($constants as $constant) {
if ($constant instanceof PropertyGenerator) {
$this->addPropertyFromGenerator($constant);
} else {
if (is_array($constant)) {
call_user_func_array(array($this, 'addConstant'), $constant);
}
}
}

return $this;
}

/**
* @param array $properties
* @return ClassGenerator
Expand Down Expand Up @@ -453,6 +582,12 @@ public function addProperty($name, $defaultValue = null, $flags = PropertyGenera
));
}

// backwards compatibility
// @todo remove this on next major version
if ($flags === PropertyGenerator::FLAG_CONSTANT) {
return $this->addConstant($name, $defaultValue);
}

return $this->addPropertyFromGenerator(new PropertyGenerator($name, $defaultValue, $flags));
}

Expand All @@ -474,6 +609,12 @@ public function addPropertyFromGenerator(PropertyGenerator $property)
));
}

// backwards compatibility
// @todo remove this on next major version
if ($property->isConst()) {
return $this->addConstantFromGenerator($property);
}

$this->properties[$propertyName] = $property;
return $this;
}
Expand Down Expand Up @@ -686,10 +827,12 @@ public function generate()
}

$uses = $this->getUses();

if (!empty($uses)) {
foreach ($uses as $use) {
$output .= 'use ' . $use . ';' . self::LINE_FEED;
}

$output .= self::LINE_FEED;
}

Expand All @@ -709,24 +852,29 @@ public function generate()
}

$implemented = $this->getImplementedInterfaces();

if (!empty($implemented)) {
$output .= ' implements ' . implode(', ', $implemented);
}

$output .= self::LINE_FEED . '{' . self::LINE_FEED . self::LINE_FEED;

$constants = $this->getConstants();

foreach ($constants as $constant) {
$output .= $constant->generate() . self::LINE_FEED . self::LINE_FEED;
}

$properties = $this->getProperties();
if (!empty($properties)) {
foreach ($properties as $property) {
$output .= $property->generate() . self::LINE_FEED . self::LINE_FEED;
}

foreach ($properties as $property) {
$output .= $property->generate() . self::LINE_FEED . self::LINE_FEED;
}

$methods = $this->getMethods();
if (!empty($methods)) {
foreach ($methods as $method) {
$output .= $method->generate() . self::LINE_FEED;
}

foreach ($methods as $method) {
$output .= $method->generate() . self::LINE_FEED;
}

$output .= self::LINE_FEED . '}' . self::LINE_FEED;
Expand Down
14 changes: 9 additions & 5 deletions library/Zend/Code/Generator/MethodGenerator.php
Expand Up @@ -167,25 +167,29 @@ public function setParameters(array $parameters)
}

/**
* @param ParameterGenerator|string $parameter
* @param ParameterGenerator|array|string $parameter
* @throws Exception\InvalidArgumentException
* @return MethodGenerator
*/
public function setParameter($parameter)
{
if (is_string($parameter)) {
$parameter = new ParameterGenerator($parameter);
} elseif (!$parameter instanceof ParameterGenerator) {
}

if (is_array($parameter)) {
$parameter = ParameterGenerator::fromArray($parameter);
}

if (!$parameter instanceof ParameterGenerator) {
throw new Exception\InvalidArgumentException(sprintf(
'%s is expecting either a string, array or an instance of %s\ParameterGenerator',
__METHOD__,
__NAMESPACE__
));
}

$parameterName = $parameter->getName();

$this->parameters[$parameterName] = $parameter;
$this->parameters[$parameter->getName()] = $parameter;

return $this;
}
Expand Down