Commit Graph

1380 Commits

Author SHA1 Message Date
Brandon Morrison aa18ce15d5 Fix pure annotations (#605)
Coming from https://github.com/ramsey/uuid/pull/603, this is an attempt
to fix the errors raised by the current phpstan settings.

I went through each of the errors raised by phpstan with the following
approach.

- If a method is part of an `@immutable` class, we can consider it pure,
  assuming it only affects internal variables.
- If a potentially pure method is calling a class's method that is only
  swapped during testing (and not during normal usage), then we can
  consider the calling method pure.
- If a class is marked deprecated, don't bother with attempting to mark
  it pure or immutable.
2025-06-25 08:24:36 -05:00
Ben Ramsey df575bdb79 Re-add the @pure annotations
These were removed in 691c2c816e but
should remain in the code base.
2025-06-25 08:24:36 -05:00
dependabot[bot] dbc810466d chore(deps-dev): bump squizlabs/php_codesniffer from 3.13.1 to 3.13.2 2025-06-23 18:34:18 -05:00
Ben Ramsey eaa5e16923 Assert the length of time bytes is 6 2025-06-23 18:01:01 -05:00
Ben Ramsey f2956967f2 Update tests for testing bytes "rollover" 2025-06-23 17:32:33 -05:00
Ben Ramsey b40c069763 Remove errant echo statement from test.
[skip ci]
2025-06-23 15:27:20 -05:00
Ben Ramsey 7abc2f2035 Ensure tests are properly checking against the previous values 2025-06-22 17:38:46 -05:00
Ben Ramsey 6bbdb8c0e7 Update Composer lock file 2025-06-22 17:38:45 -05:00
dependabot[bot] e957fd25b3 chore(deps-dev): bump sebastianfeldmann/git from 3.14.2 to 3.14.3 2025-06-16 21:13:49 -05:00
dependabot[bot] 6b9adff814 chore(deps-dev): bump squizlabs/php_codesniffer from 3.13.0 to 3.13.1 2025-06-16 18:29:25 -05:00
dependabot[bot] 777e7256c2 chore(deps-dev): bump captainhook/captainhook from 5.25.2 to 5.25.5 2025-06-16 18:07:43 -05:00
dependabot[bot] e512568297 chore(deps-dev): bump justinrainbow/json-schema from 6.4.1 to 6.4.2 2025-06-09 17:06:57 -05:00
dependabot[bot] 10c230387f chore(deps-dev): bump slevomat/coding-standard from 8.18.1 to 8.19.1 2025-06-09 16:45:06 -05:00
Massimiliano Arione 8460cbacb4 remove useless ext-json requirement (#596)
Fix #595
2025-06-06 19:44:28 -05:00
dependabot[bot] 0823fc23fc chore(deps-dev): bump nikic/php-parser from 5.4.0 to 5.5.0 2025-06-02 16:47:47 -05:00
Ben Ramsey fdf4dd4e2f Prepare release 4.8.1 4.8.1 2025-06-01 01:28:46 -05:00
Ben Ramsey b366701d62 Update documentation with references to RFC 9562 2025-06-01 00:47:29 -05:00
Ben Ramsey 6700833915 Prepare for release 4.8.0 4.8.0 2025-05-31 21:32:15 -05:00
Ben Ramsey a11a7e5bde Lock brick/math to ^0.9 for testing and update CHANGELOG 2025-05-31 20:42:10 -05:00
Ben Ramsey db6a661d56 Merge branch 'derrabus-bump/math' into 4.x 2025-05-31 20:14:42 -05:00
Ben Ramsey d52de61ea0 fix: max UUID should be variant 7, nil UUID should be variant 0 2025-05-31 20:14:14 -05:00
Ben Ramsey dbcee99769 Update CHANGELOG with most recent changes 2025-05-31 20:14:14 -05:00
Ben Ramsey efc44092cf Clean up docblocks, code, and note new deprecations
The following are deprecated:

* `Ramsey\Uuid\Codec\OrderedTimeCodec`
* `Ramsey\Uuid\Codec\TimestampFirstCombCodec`
* `Ramsey\Uuid\Codec\TimestampLastCombCodec`
* `Ramsey\Uuid\Generator\CombGenerator`
2025-05-31 20:14:13 -05:00
Ben Ramsey d43a9e71b0 chore: update copyright year
[ci skip]
2025-05-31 20:14:13 -05:00
Ben Ramsey 4d0c09dae4 chore: convert @psalm-return to @return 2025-05-31 20:14:13 -05:00
Ben Ramsey b21cb6d655 fix: max UUID should be variant 7, nil UUID should be variant 0 2025-05-31 20:12:03 -05:00
Ben Ramsey fe83f84089 Update CHANGELOG with most recent changes 2025-05-31 17:22:10 -05:00
Ben Ramsey 6bd7221484 Clean up docblocks, code, and note new deprecations
The following are deprecated:

* `Ramsey\Uuid\Codec\OrderedTimeCodec`
* `Ramsey\Uuid\Codec\TimestampFirstCombCodec`
* `Ramsey\Uuid\Codec\TimestampLastCombCodec`
* `Ramsey\Uuid\Generator\CombGenerator`
2025-05-31 17:20:12 -05:00
Ben Ramsey 7eec9c2202 chore: update copyright year
[ci skip]
2025-05-26 01:57:50 -05:00
Ben Ramsey 89d258a96a chore: convert @psalm-return to @return 2025-05-26 00:21:30 -05:00
Ben Ramsey bbad2a24e2 Merge branch '4.x' into bump/math 2025-05-26 00:09:56 -05:00
Choraimy Kroonstuiver c72360e015 Hexadecimal is never an empty string (#593)
Similarly to UUIDs, a hexadecimal can never be empty, this PR documents
it as such.

More and more libraries are starting to enforce stricter typing, I was
dealing with a library that required a `non-empty-string` which
hexadecimal isn't (is, but isn't documented that it is) which requires
either baselining false positives are adding redundant assertions.
2025-05-26 00:09:20 -05:00
philipp.nardmann fd7c1c974c Fixed PHP 8.4 deprecation (#590)
Fixed deprecation warning for str_getcsv in php 8.4, since the default
parameter will change, by providing the parameter explicitly.

Sidenote: some of the vendor packages still have the same issue with
deprecation warnings when running code maintenance tools. They should be
updated as well.

Closes #587
2025-05-25 23:49:04 -05:00
Ben Ramsey 7f78cfe7a9 Merge branch '4.x' into bump/math 2025-05-25 23:41:11 -05:00
Ben Ramsey 716f668327 chore: update CaptainHook configuration 2025-05-25 23:27:24 -05:00
Ben Ramsey 79dc39ff19 chore: remove funding file 2025-05-25 23:14:08 -05:00
Ben Ramsey 876938ee3e ci: only run benchmarks on highest versions of dependencies 2025-05-25 23:11:24 -05:00
Ben Ramsey 9fcf91e2ad ci: use highest dependencies for specific jobs 2025-05-25 23:06:48 -05:00
Ben Ramsey 8479f8c53d chore: lock packages to PHP 8.0.0 compatibility 2025-05-25 22:59:54 -05:00
Ben Ramsey 60950ebc39 ci: update CI workflows 2025-05-25 22:28:38 -05:00
Ben Ramsey bdd1b2f71f chore(deps-dev): upgrade remaining development dependencies 2025-05-25 19:37:26 -05:00
Ben Ramsey c66ae5f095 chore(deps-dev): upgrade CaptainHook 2025-05-25 18:39:48 -05:00
Ben Ramsey 76cbc566e2 chore(deps-dev): upgrade PHPStan 2025-05-25 16:52:53 -05:00
Ben Ramsey 691c2c816e chore(deps-dev): remove Psalm 2025-05-25 14:53:53 -05:00
Ben Ramsey c60d906a39 chore(deps-dev): remove ramsey/composer-repl 2025-05-25 13:42:30 -05:00
Ben Ramsey c89f57c1cf Merge branch 'jrfnl-feature/composer-bump-parallel-lint' into 4.x 2025-05-25 11:12:55 -05:00
Alexander M. Turek 7e10f46380 Allow brick/math 0.13 2025-03-04 09:48:28 +01:00
jrfnl c11fa78821 Composer: update PHP Parallel Lint
... to a version which is compatible with PHP 8.4.

Ref: https://github.com/php-parallel-lint/PHP-Parallel-Lint/releases/tag/v1.4.0
2025-01-14 11:46:40 +01:00
dependabot[bot] 99fc2f4614 chore(deps): bump ridedott/merge-me-action from 2.10.108 to 2.10.111 2024-11-25 15:13:53 -06:00
chris bf5d6f58bb tests: add tests for PHP 8.4 (#568) 2024-11-23 12:24:08 -06:00