Skip to content

Commit 02d3a68

Browse files
webwizoAsif Iqbal
and
Asif Iqbal
authored
resolve #64 issue for php8 depratected notice (#65)
Co-authored-by: Asif Iqbal <[email protected]>
1 parent 6b4b2f4 commit 02d3a68

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"illuminate/view": "5.6.x|5.7.x|5.8.x|^6.0|^7.0|^8.0",
2222
"illuminate/support": "5.6.x|5.7.x|5.8.x|^6.0|^7.0|^8.0",
2323
"illuminate/contracts": "5.6.x|5.7.x|5.8.x|^6.0|^7.0|^8.0",
24-
"php": "^7.2"
24+
"php": "^7.2|^8.0"
2525
},
2626
"require-dev": {
2727
"phpunit/phpunit": "^7.5|^8.0",

src/View/Factory.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php namespace Webwizo\Shortcodes\View;
1+
<?php
2+
3+
namespace Webwizo\Shortcodes\View;
24

35
use Illuminate\Events\Dispatcher;
46
use Illuminate\View\ViewFinderInterface;
@@ -49,7 +51,7 @@ public function make($view, $data = [], $mergeData = [])
4951
// the caller for rendering or performing other view manipulations on this.
5052
$data = array_merge($mergeData, $this->parseData($data));
5153

52-
return tap(new View($this, $this->getEngineFromPath($path), $view, $path, $data, $this->shortcode), function ($view) {
54+
return tap(new View($this->shortcode, $this, $this->getEngineFromPath($path), $view, $path, $data), function ($view) {
5355
$this->callCreator($view);
5456
});
5557
}

src/View/View.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php namespace Webwizo\Shortcodes\View;
1+
<?php
2+
3+
namespace Webwizo\Shortcodes\View;
24

35
use ArrayAccess;
46
use Illuminate\Contracts\Support\Renderable;
@@ -19,14 +21,14 @@ class View extends IlluminateView implements ArrayAccess, Renderable
1921
/**
2022
* Create a new view instance.
2123
*
24+
* @param \Webwizo\Shortcodes\Compilers\ShortcodeCompiler $shortcode
2225
* @param \Illuminate\View\Factory|Factory $factory
2326
* @param \Illuminate\Contracts\View\Engine|EngineInterface $engine
2427
* @param string $view
2528
* @param string $path
2629
* @param array $data
27-
* @param \Webwizo\Shortcodes\Compilers\ShortcodeCompiler $shortcode
2830
*/
29-
public function __construct(Factory $factory, EngineInterface $engine, $view, $path, $data = [], ShortcodeCompiler $shortcode)
31+
public function __construct(ShortcodeCompiler $shortcode, Factory $factory, EngineInterface $engine, $view, $path, $data = [])
3032
{
3133
parent::__construct($factory, $engine, $view, $path, $data);
3234
$this->shortcode = $shortcode;

0 commit comments

Comments
 (0)