Skip to content

Shorten Symfony Recipe URL Cache Keys #831

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

Merged
merged 1 commit into from
Nov 22, 2021
Merged

Conversation

cjunge
Copy link

@cjunge cjunge commented Nov 21, 2021

Fixes #830.

This change replaces the simple generated composer filesystem cache key with a slightly shorter one only for the Symfony Recipes repos.

/home/cameron/.cache/composer/repo/flex/https---api.github.com-repos-symfony-recipes-contrib-contents-friendsofsymfony.elastica-bundle.5.0.json-ref-flex-main
becomes
/home/cameron/.cache/composer/repo/flex/sf-recipes-contrib-friendsofsymfony.elastica-bundle.5.0.json-ref-flex-main

This won't fix other recipe files hosted on long paths.

@cjunge
Copy link
Author

cjunge commented Nov 21, 2021

The failing tests appear to be due to an API change in Composer, unrelated to my code changes. Should I fix these?

        $realPkg = new Package('real', '1.0.0', '1.0.0');
        $realPkgLink = new Link('lorem', 'real', class_exists(MatchAllConstraint::class) ? new MatchAllConstraint() : null, 'wraps', '1.0.0');

        $virtualPkgFoo = new Package('pack_foo', '1.0.0', '1.0.0');
        $virtualPkgFoo->setType('symfony-pack');
        $virtualPkgFoo->setRequires([$realPkgLink]);
        $realPkg = new Package('real', '1.0.0', '1.0.0');
        $realPkgLink = new Link('lorem', 'real', class_exists(MatchAllConstraint::class) ? new MatchAllConstraint() : null, 'wraps', '1.0.0');

        $virtualPkgFoo = new Package('pack_foo', '1.0.0', '1.0.0');
        $virtualPkgFoo->setType('symfony-pack');
        $virtualPkgFoo->setRequires(['real' => $realPkgLink]);

@nicolas-grekas nicolas-grekas changed the base branch from main to 1.x November 22, 2021 18:19
@nicolas-grekas nicolas-grekas changed the title 830: Shorten Symfony Recipe URL Cache Keys Shorten Symfony Recipe URL Cache Keys Nov 22, 2021
@nicolas-grekas
Copy link
Member

Thank you @cjunge.

@nicolas-grekas nicolas-grekas merged commit acd0b50 into symfony:1.x Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File name too long
3 participants