feat(company): serialize employees timeframes to topcompanies_prs.json#239
Merged
Progi1984 merged 1 commit intoJul 22, 2026
Merged
Conversation
Company::toArray() now embeds the full `employees` map — login →
[{ start_date, end_date }, …] — sourced from var/data/companies.json.
Traces already loaded this to attribute each PR to the company employing
the author at merge time; it just was not propagated to the JSON
consumed by the front. Publishing it enables the front to render a
proper members table (entry/departure per period, still-active flag,
multiple periods per person) instead of relying on the ad-hoc
`contributors` list, which is the derived set of PR authors — a
different (and noisier) population.
The docblock is widened to `array<string, mixed>` because the shape
now nests `employees[].time_frames[]`; phpstan is happy and the
callers only consume the whole array via json_encode.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Progi1984
approved these changes
Jul 22, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Company::toArray()now embeds the fullemployeesmap —login → [{ start_date, end_date }, …]— sourced fromvar/data/companies.json.contributorslist, which is the derived set of PR authors — a different, noisier population.toArray()docblock is widened toarray<string, mixed>because the shape now nestsemployees[].time_frames[]. phpstan (level max) is green onsrc/DTO/Company.php, and callers only consume the array viajson_encode.Test plan
vendor/bin/phpstan analyse src/DTO/Company.php --level=max→ No errors.php bin/console traces:generate:topcompanies→topcompanies_prs.jsonregenerated successfully; PrestaShop entry now carriesemployees(69 entries) alongside the pre-existingcontributors(85 entries).json { "login": "0x346e3730", "time_frames": [{ "start_date": "2022-10-03", "end_date": "2023-06-30" }] }🤖 Generated with Claude Code