Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add typehint #286

Merged
merged 2 commits into from
Aug 23, 2019
Merged

add typehint #286

merged 2 commits into from
Aug 23, 2019

Conversation

wirwolf
Copy link
Contributor

@wirwolf wirwolf commented Aug 23, 2019

add composer require ext
add throw phpdoc

Andru Cherny added 2 commits August 23, 2019 11:45
add composer require ext
add throw phpdoc
@rquadling rquadling merged commit eb1724e into beberlei:master Aug 23, 2019
@jakzal
Copy link
Contributor

jakzal commented Sep 24, 2019

This change made that the whole beberlei/assert package now requires the intl extension to be installed.

I failed to find how this library is dependent on intl. Surely, not all features depend on it to make it whole package's dependency?

@jakzal
Copy link
Contributor

jakzal commented Sep 24, 2019

Ok, found out that #268 and #269 make that count() and isCountable() can now work with intl resources.

It's what I'd call an optional dependency though. The Assertion class, and therefore the whole library, can work perfectly fine without the intl extension.

The intl extension is still not being commonly installed as for most projects it's of no benefit. IMO It's not nice to force people to install it because an assertion library "needs" it for some edge cases.

rquadling pushed a commit that referenced this pull request Oct 10, 2019
Fixes #288.

While #268 and #269 updated count() and isCountable() to now work with intl resources, #286 made that the whole beberlei/assert package now requires the intl extension to be installed.

However, the intl extension dependency is a soft dependency.
The package does not need intl for most of its features and can safely work without it.
@Taluu
Copy link

Taluu commented Nov 23, 2019

This is actually a BC break, making it impossible to properly extend Assert, Assertion and AssertionChain classes until php 7.4 (because a signature mismatch, which can trigger several phpstan errors).

Resolving these can be kinda trivial, but still...

beberlei pushed a commit that referenced this pull request Apr 18, 2021
* Remove ext-intl as a required extension, making it a suggested extension for
use with Assertion::count(), Assertion::isCountable(), Assertion::minCount(),
and Assertion::maxCount() to operate on ResourceBundles.

* Correct @method return typehint for LazyAssertion chaining

* Restored `\Assert\Assertion::createException()` signature to 3.2.2.

Sincerely apologies to the BC break.

* Fix docblock typehint

* Prepare v3.2.4

* Remove a hard dependency on the intl extension (#289)

Fixes #288.

While #268 and #269 updated count() and isCountable() to now work with intl resources, #286 made that the whole beberlei/assert package now requires the intl extension to be installed.

However, the intl extension dependency is a soft dependency.
The package does not need intl for most of its features and can safely work without it.

* Fix docblocks for `all` to show that they are expected to receive an
array of things

* Preapare v3.2.5

* Make `Assert\Assertion::stringify()` UTF-8 safe.

* Prepare v3.2.6

* Reinstate LazyAssertion docblock

* ## 3.2.7 - 2019-12-19

### Fixes
- Reinstated the `@method` return type for `Assert\LazyAssertion` methods to show that the return type is `LazyAssertion`.

* Fixes

Co-authored-by: Richard Quadling <[email protected]>
Co-authored-by: Jakub Zalas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants