Skip to content

Commit a8d86df

Browse files
committed
update
1 parent 16f9b43 commit a8d86df

File tree

1 file changed

+13
-40
lines changed

1 file changed

+13
-40
lines changed

AGENTS.md

Lines changed: 13 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,8 @@
44

55
- `sentry/sentry-symfony` is a Composer library and Symfony bundle, not an
66
application.
7-
- The bundle wires the Sentry PHP SDK into Symfony and optional integrations
8-
such as request handling, console, Messenger, Twig, Cache, DBAL, HTTP
9-
client, metrics, and Monolog/logging.
10-
- The main entry points are:
11-
- `src/SentryBundle.php`: registers compiler passes.
12-
- `src/DependencyInjection/Configuration.php`: defines the config tree.
13-
- `src/DependencyInjection/SentryExtension.php`: turns config into container
14-
definitions and parameters.
15-
- `src/Resources/config/services.yaml`: defines base services and listener
16-
tags.
17-
- `src/aliases.php`: selects version-specific classes by runtime feature
18-
detection.
7+
- Use this file for repo-specific constraints that are easy to miss, and
8+
explore the codebase for current implementation details.
199

2010
## Compatibility Rules
2111

@@ -42,23 +32,13 @@
4232
- Keep `declare(strict_types=1);` in PHP files.
4333
- Do not introduce PHP syntax or runtime assumptions that require newer than
4434
PHP `7.2` in shipped code unless the package minimum is being raised.
45-
- Follow the existing formatting rules from `.php-cs-fixer.dist.php`: Symfony
46-
style, short arrays, ordered imports, yoda conditions, and 4-space
47-
indentation.
35+
- Follow the existing formatting rules from `.php-cs-fixer.dist.php`.
4836
- Services are private by default. Prefer existing FQCN service IDs and aliases
4937
instead of introducing new public services.
5038
- If a service or class has no intended public API surface but is public only
5139
for tests, wiring, or framework integration reasons, mark it `@internal` so
5240
users do not rely on it as a stable extension point and future refactors do
5341
not become accidental BC breaks.
54-
- Config changes usually require synchronized updates in all of these places:
55-
- `src/DependencyInjection/Configuration.php`
56-
- `src/DependencyInjection/SentryExtension.php`
57-
- `src/Resources/config/services.yaml`
58-
- `src/Resources/config/schema/sentry-1.0.xsd`
59-
- `tests/DependencyInjection/Fixtures/{yml,php,xml}`
60-
- `tests/DependencyInjection/ConfigurationTest.php`
61-
- `tests/DependencyInjection/SentryExtensionTest.php`
6242
- XML fixtures are still relevant for older Symfony versions even though XML
6343
config support is skipped on Symfony 8+ in tests.
6444
- End-to-end behavior lives in `tests/End2End/App`. Prefer end-to-end coverage
@@ -81,23 +61,19 @@
8161
- For config changes, update the YAML, PHP, and XML DI fixtures together.
8262
- For optional-package behavior, mirror the existing pattern of conditional
8363
skips instead of forcing packages to exist in every environment.
84-
- Local verification commands:
85-
- `composer install`
86-
- `composer cs-check`
87-
- `composer phpstan`
88-
- `composer psalm`
89-
- `composer tests`
90-
- `composer check`
91-
- `composer phpstan` runs PHPStan with `512M` because the default local PHP
92-
memory limit can be too low for this repo.
93-
- `php-cs-fixer` is the formatting tool in this repo. If formatting fails, run
94-
`composer cs-fix` and then rerun `composer check`.
64+
- After editing files, run the relevant formatting, lint, and test commands for
65+
the code you changed.
9566
- Before committing, run `composer check`.
9667

9768
## Docs And Release Notes
9869

99-
- Update `README.md` when public installation, configuration, or usage changes.
100-
- Update `CHANGELOG.md` for user-facing changes.
70+
- `README.md` and `CHANGELOG.md` are updated manually during releases, so do
71+
not modify them as part of normal development changes.
72+
- If a change may require updates in the separate documentation repo, ask the
73+
user whether to review their locally checked out docs. The user must provide
74+
the local path. If they opt in, update that repo's `master` branch when safe,
75+
use git worktrees to inspect the relevant docs, and suggest any needed
76+
changes to avoid stale documentation.
10177
- Add or update an `UPGRADE-*.md` file when a change is breaking or alters the
10278
upgrade path.
10379
- `CONTRIBUTING.md` states that new code should include tests and notes that
@@ -109,7 +85,4 @@
10985
- `.github/workflows/tests.yaml` runs a PHP/Symfony matrix and also includes
11086
jobs that remove optional packages before running tests.
11187
- `.github/workflows/static-analysis.yaml` runs PHP-CS-Fixer, PHPStan, and
112-
Psalm on a recent PHP version. Check the workflow file for the exact version
113-
currently used in CI.
114-
- A single local green run is necessary but not sufficient. Avoid changes that
115-
only work when optional packages are present.
88+
Psalm on a single recent PHP version rather than across the full test matrix.

0 commit comments

Comments
 (0)