CacheManager::remove() throws a TypeError for a string path
Maintainers usually reply within 1 day
A pull request for this has already been merged.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start in the Silverback\ApiComponentsBundle\Imagine\CacheManager class, at its remove() method, and at the ImagineRemoveEvent constructor it calls, which the issue says requires ?array. Compare remove()'s parameter type with liip's CacheManager::remove() signature. Done when a single string path is accepted and normalised to an array before the event is built, and a test covering remove() with a string path passes.
Written by the indexing model from the issue text.
Description
Found while working on components-web-app#143. Silverback\ApiComponentsBundle\Imagine\CacheManager::remove() passes its $paths to ImagineRemoveEvent, which requires ?array. liip's CacheManager::remove() signature allows string|array|null, so remove('path/to/file.jpg') (a single path, as liip's own callers and docs use it) throws a TypeError. Fix: normalise a string to [$path] before building the event.
- Dominant language
- PHP
- Stars
- 32
- Forks
- 8
- Avg merge
- 40m
- Merged PRs (30d)
- 129
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from components-web-app/api-components-bundle
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
components-web-app/api-components-bundle#452 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
components-web-app/api-components-bundle#333 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
components-web-app/api-components-bundle#325 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
components-web-app/api-components-bundle#259 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
components-web-app/api-components-bundle#186 ·
Maintainers usually reply within 1 day
All issues in components-web-app/api-components-bundle
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Automattic/blocks-engine#2866 ·
Maintainers usually reply within 1 day
-
enhancement good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
backend gamification P0
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
semanadeinformatica/website#461 ·
-
HttpRequestTrait fatals on WordPress 7.2: $blocked_http_requests clashes with WP_UnitTestCase_BaseOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
area: docs eco: php good first issue help wanted lane: free-agent roadmap size: XS type: docs
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
arminazimi/evergreen#453 ·
Maintainers usually reply within 1 day