Skip to content

Ignore the generated config/schema.json, and check .gitattributes stay in sync - #3845

Merged
Kocal merged 1 commit into
symfony:3.xfrom
Kocal:chore/gitignore-config-schema
Sep 8, 2026
Merged

Kocal merged 1 commit into
symfony:3.xfrom
Kocal:chore/gitignore-config-schema

Conversation

@Kocal

@Kocal Kocal commented Sep 8, 2026

Copy link
Copy Markdown
Member
Q A
Bug fix? no
New feature? no
Deprecations? no
Documentation? no
Issues -
License MIT

Running composer install in a package writes a config/schema.json next to the config/reference.php that is already ignored, so it shows up as an untracked file and is easy to commit by accident. Toolkit already ignored it; this adds the same line to the fifteen other packages that ignore config/reference.php, right below it. Native and Notify are left alone, since Notify has no config/ directory and Native ignores neither of the two.

While checking that .github/sync-packages.php had nothing to say about this (it regenerates .gitattributes, not .gitignore), it turned out two packages had drifted: Pagination was missing /assets/tsconfig.json and had /assets/src and /doc out of canonical order, and Toolkit was missing /doc. Both are now published with files that should be excluded from their archives. This regenerates them.

Nothing ran that script in CI, which is why the drift went unnoticed, so the "Validate packages definition" job now runs it and fails when the working tree changes. It needs PHP and the root dependencies, set up the same way the PHPStan job already does.

@Kocal Kocal self-assigned this Sep 8, 2026
@carsonbot carsonbot added the Status: Needs Review Needs to be reviewed label Sep 8, 2026
…y in sync

| Q              | A
| -------------- | ---
| Bug fix?       | no
| New feature?   | no
| Deprecations?  | no
| Documentation? | no
| Issues         | -
| License        | MIT

Running `composer install` in a package writes a `config/schema.json` next to the `config/reference.php` that is already ignored, so it shows up as an untracked file and is easy to commit by accident. Toolkit already ignored it; this adds the same line to the fifteen other packages that ignore `config/reference.php`, right below it. Native and Notify are left alone, since Notify has no `config/` directory and Native ignores neither of the two.

While checking that `.github/sync-packages.php` had nothing to say about this (it regenerates `.gitattributes`, not `.gitignore`), it turned out two packages had drifted: `Pagination` was missing `/assets/tsconfig.json` and had `/assets/src` and `/doc` out of canonical order, and `Toolkit` was missing `/doc`. Both are now published with files that should be excluded from their archives. This regenerates them.

Nothing ran that script in CI, which is why the drift went unnoticed, so the "Validate packages definition" job now runs it and fails when the working tree changes. It needs PHP and the root dependencies, set up the same way the PHPStan job already does.
@Kocal
Kocal force-pushed the chore/gitignore-config-schema branch from 9388781 to 0bde23a Compare September 8, 2026 16:29
@Kocal Kocal changed the title Ignore the generated config/schema.json in every package Ignore the generated config/schema.json, and check .gitattributes stay in sync Sep 8, 2026
@Kocal
Kocal merged commit 7a85f41 into symfony:3.x Sep 8, 2026
38 of 39 checks passed
@Kocal
Kocal deleted the chore/gitignore-config-schema branch September 8, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Needs Review Needs to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants