Skip to content

Commit ca29039

Browse files
committed
minor #30943 [Asset] PathPackage : use parent getUrl Method instead of duplicating code (tiecoders)
This PR was merged into the 4.3-dev branch. Discussion ---------- [Asset] PathPackage : use parent getUrl Method instead of duplicating code | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Use parent getUrl method instead of duplicating code. Commits ------- 0c2a2bf ASSET-PathPackage-Enhancement - Use parent getUrl method instead of duplicating code.
2 parents 04eed54 + 0c2a2bf commit ca29039

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Symfony/Component/Asset/PathPackage.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,7 @@ public function __construct(string $basePath, VersionStrategyInterface $versionS
5353
*/
5454
public function getUrl($path)
5555
{
56-
if ($this->isAbsoluteUrl($path)) {
57-
return $path;
58-
}
59-
60-
$versionedPath = $this->getVersionStrategy()->applyVersion($path);
56+
$versionedPath = parent::getUrl($path);
6157

6258
// if absolute or begins with /, we're done
6359
if ($this->isAbsoluteUrl($versionedPath) || ($versionedPath && '/' === $versionedPath[0])) {

0 commit comments

Comments
 (0)