Skip to content

Commit 90db783

Browse files
committed
🔥 remove deprecated PhpAsset::load() method
1 parent 24a66e7 commit 90db783

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

src/Roots/Acorn/Assets/Asset/PhpAsset.php

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,6 @@
66

77
class PhpAsset extends Asset
88
{
9-
/**
10-
* Get the returned value of the asset
11-
*
12-
* @deprecated since 2.1.2. Use require(), requireOnce(), include() or includeOnce() instead.
13-
*
14-
* @param bool $require
15-
* @param bool $once
16-
* @return mixed
17-
*/
18-
public function load($require = false, $once = false)
19-
{
20-
if ($require) {
21-
return $once
22-
? $this->requireOnce()
23-
: $this->require();
24-
}
25-
26-
return $once
27-
? $this->includeOnce()
28-
: $this->include();
29-
}
30-
319
/**
3210
* Get the returned value of the asset
3311
*

tests/Assets/AssetTest.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,6 @@
7070
assertMatchesSnapshot($this->assets->asset('bnif.php')->requireOnce());
7171
});
7272

73-
it('can load a php asset', function () {
74-
assertMatchesSnapshot($this->assets->asset('bnif.php')->load(false, false));
75-
assertMatchesSnapshot($this->assets->asset('bnif.php')->load(false, true));
76-
assertMatchesSnapshot($this->assets->asset('bnif.php')->load(true, false));
77-
assertMatchesSnapshot($this->assets->asset('bnif.php')->load(true, true));
78-
});
79-
8073
it('can fail to include a php asset', function () {
8174
(new PhpAsset(temp('does/not/exist.php'), 'https://kjo.kjo/'))->include();
8275
})->throws(FileNotFoundException::class);

0 commit comments

Comments
 (0)