-
Notifications
You must be signed in to change notification settings - Fork 11
feat!: rebuild timezone handling for PHP 8.3 and Symfony 7.4–8.1 #21
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
Open
lunetics
wants to merge
34
commits into
master
Choose a base branch
from
chore/php8-symfony8-modernization
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
fe348df
feat!: rebuild timezone handling for modern Symfony
lunetics 9c34917
test: make locale resolution coverage intl-independent
lunetics 2f7f7d1
fix: keep Symfony 8.1 and PHP 8.5 CI strict
lunetics 74d8f65
fix: mark preference writes on the request inside the storages
lunetics 8b5254a
test: verify the distribution archive instead of .gitattributes text
lunetics 074698f
fix: reject NAT64 and 6to4 client addresses before MaxMind lookup
lunetics 0cc535f
fix: validate the __Secure- cookie prefix like its __Host- sibling
lunetics 14846ef
test: let failOnDeprecation actually fail on first-party deprecations
lunetics 26e224a
fix: keep TimezoneDataCollector::reset() safe after profile rehydration
lunetics c5be7e1
refactor: bind CurrentTimezoneProvider to the execution-context inter…
lunetics 2c5546f
fix: maintain the preference-written marker in a storage decorator
lunetics 8742aca
fix: union MaxMind non-public ranges with Symfony's private subnets
lunetics 3abe0f8
test: harden the distribution-archive gate against silent degradation
lunetics 8bf1c3a
docs: sync the plan document with the implemented contracts
lunetics a0689e4
test: pin CurrentTimezoneProvider to the execution-context interface
lunetics 57218c0
fix: decorate the configured storage id instead of aliasing around it
lunetics c5d54c8
fix: make the explicit MaxMind range list self-sufficient again
lunetics 5050d4c
test: close the remaining distribution-gate bypasses
lunetics b8750d0
test: give the controller suppression tests a marker that could fire
lunetics ebb3c9f
fix: scope the preference-written marker to the storage's write medium
lunetics a285116
refactor: derive stored-preference priorities from their constants
lunetics ed8f1a7
fix: keep the form bridge from breaking configured model timezones
lunetics 3bc8104
ci: stop persisting the checkout credential in the workspace
lunetics 511f5a3
test: assert both resolver names before comparing their order
lunetics b4dfd9e
docs: state that resolution happens once per main request
lunetics 855045b
docs: document the read cache and preference-event failure semantics
lunetics 460af80
feat!: support only maintained PHP and Symfony lines
lunetics b85d86b
refactor: use the defined 413 constant for oversized bodies
lunetics f446e1b
test: restore the exception handler only when the kernel pushed one
lunetics 55b381b
test: pin the cookie anti-clobber branch at the storage level
lunetics b704355
docs: state the PHP floor per Symfony line
lunetics e14032b
build: require the analyzer versions this code actually needs
lunetics beff109
test: also restore the error handler the debug kernel installs
lunetics 4af18cd
Revert "test: also restore the error handler the debug kernel installs"
lunetics File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| /.github export-ignore | ||
| /.github/** export-ignore | ||
| /.firecrawl export-ignore | ||
| /.firecrawl/** export-ignore | ||
| /.claude export-ignore | ||
| /.claude/** export-ignore | ||
| /Tests export-ignore | ||
| /Tests/** export-ignore | ||
| /scripts export-ignore | ||
| /scripts/** export-ignore | ||
| /.gitattributes export-ignore | ||
| /.gitignore export-ignore | ||
| /.travis.yml export-ignore | ||
| /phpunit.xml.dist export-ignore | ||
| /phpstan.neon.dist export-ignore | ||
| /package.json export-ignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| name: Tests | ||
|
|
||
| on: | ||
| push: | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| minimal-dependencies: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: '8.3' | ||
| coverage: none | ||
| tools: composer:v2 | ||
| - run: composer validate --strict --no-check-publish | ||
| - run: composer update --no-dev --prefer-dist --no-interaction --no-progress | ||
| - run: composer audit --locked | ||
| - name: Smoke-test no-dev package | ||
| run: php scripts/no-dev-smoke.php | ||
|
|
||
| test: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - php: '8.3' | ||
| symfony: '7.4.*' | ||
| - php: '8.4' | ||
| symfony: '7.4.*' | ||
| - php: '8.4' | ||
| symfony: '8.1.*' | ||
| - php: '8.5' | ||
| symfony: '8.1.*' | ||
|
|
||
| name: PHP ${{ matrix.php }} / Symfony ${{ matrix.symfony }} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: ${{ matrix.php }} | ||
| coverage: none | ||
| tools: composer:v2 | ||
|
|
||
| - run: composer validate --strict --no-check-publish | ||
|
|
||
| - name: Select Symfony runtime versions | ||
| run: >- | ||
| composer require --no-update | ||
| symfony/config:${{ matrix.symfony }} | ||
| symfony/dependency-injection:${{ matrix.symfony }} | ||
| symfony/http-foundation:${{ matrix.symfony }} | ||
| symfony/http-kernel:${{ matrix.symfony }} | ||
|
|
||
| - name: Select Symfony development versions | ||
| run: >- | ||
| composer require --dev --no-update | ||
| symfony/asset-mapper:${{ matrix.symfony }} | ||
| symfony/console:${{ matrix.symfony }} | ||
| symfony/event-dispatcher:${{ matrix.symfony }} | ||
| symfony/form:${{ matrix.symfony }} | ||
| symfony/framework-bundle:${{ matrix.symfony }} | ||
| symfony/messenger:${{ matrix.symfony }} | ||
| symfony/routing:${{ matrix.symfony }} | ||
| symfony/security-bundle:${{ matrix.symfony }} | ||
| symfony/security-core:${{ matrix.symfony }} | ||
| symfony/security-csrf:${{ matrix.symfony }} | ||
| symfony/serializer:${{ matrix.symfony }} | ||
| symfony/twig-bundle:${{ matrix.symfony }} | ||
| symfony/web-profiler-bundle:${{ matrix.symfony }} | ||
|
|
||
| - run: composer update --prefer-dist --no-interaction --no-progress | ||
| - run: composer audit --locked | ||
| - run: composer check | ||
|
|
||
| prefer-lowest: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: '8.3' | ||
| coverage: none | ||
| tools: composer:v2 | ||
| - run: composer validate --strict --no-check-publish | ||
| - run: composer update --prefer-lowest --prefer-dist --no-interaction --no-progress | ||
| - run: composer audit --locked --no-dev | ||
| - run: composer check | ||
|
|
||
| javascript: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '24' | ||
| - run: npm test | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| /vendor/ | ||
| /var/ | ||
| /.phpunit.cache/ | ||
| /composer.lock | ||
| /.claude/ | ||
| /.firecrawl/ |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Changelog | ||
|
|
||
| ## Unreleased — 2.0 | ||
|
|
||
| - Replaced the legacy Guesser/Event API with ordered, explicitly tagged timezone resolvers and traceable resolution results. | ||
| - Added validated `TimezoneId`, per-request current-timezone provider, and bounded execution context without global timezone mutation. | ||
| - Added versioned session persistence, signed HMAC/HKDF cookie persistence, and a request/response-aware custom storage contract. | ||
| - Added opt-in browser timezone synchronization with CSRF, strict JSON protocol, and a dependency-free ES module. | ||
| - Added explicit authenticated-user and OIDC contracts, MaxMind City support, and locale mapping/unique-country inference. | ||
| - Added optional Twig, Form, Messenger, profiler, and console integrations. Messenger middleware is published for application bus configuration and does not mutate buses. | ||
| - Added independent resolution and persistence failure strategies, structured redacted logging, diagnostics, supported-version CI, and V2 migration documentation. | ||
| - Added the explicitly registered `CallableTimezoneResolver` convenience adapter for application callables, with typed policy-controlled failures and strict result/source validation. | ||
| - Hardened container compilation: integration keys are strict; cookie and MaxMind identifiers are validated; aware-user/accessor exceptions become typed resolver failures; and configured-service alias cycles are rejected. | ||
| - Scoped clock selection to the bundle's internal alias without defining or replacing the application's global PSR clock alias. | ||
| - Hardened browser/session and diagnostics behavior: sessionless session-storage writes return `503`, and profiler data survives profile serialization/reload. | ||
| - Hardened distribution and CI checks with automatic bundle AssetMapper discovery, clean Composer `--no-dev` smoke coverage, a production-dependency audit at the dependency floor, and archive retention of linked scope/plan docs and the root `LICENSE`. | ||
| - Requires PHP `^8.3` and Symfony `^7.4.13 || ^8.1`: unmaintained Symfony 8.0, the older 6.4 LTS, and end-of-life PHP 8.2 are outside the supported range, and the floor excludes the versions affected by CVE-2026-48736. | ||
| - Removed the bundle Validator integration and the Symfony Validator requirement. V2 has no 1.x compatibility layer. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.