Skip to content

Commit 7522d1e

Browse files
committed
Fix issues related to recent PyroCMS API updates
1 parent d202150 commit 7522d1e

File tree

7 files changed

+17
-12
lines changed

7 files changed

+17
-12
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/vendor
2+
.DS_Store
23
composer.lock

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#### [1.1.6] - 2017-90-11
2+
##### Changed
3+
- Fix issues related to recent PyroCMS API updates
4+
15
#### [1.1.5] - 2017-90-10
26
##### Changed
37
- Upgrade to Twig v4

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Use the `make:addon` command as per usual, [documentation](https://www.pyrocms.c
7272
php artisan make:addon vendor.module.name
7373
```
7474

75-
The previous command creates a module based on the [default module](https://github.com/pyrocms-templates/default-module) template. The downloaded module template will be cached at `app/storage/streams/default/builder/default-module`.
75+
The previous command creates a module based on the [default module](https://github.com/pyrocms-templates/default-module) template. The downloaded module template will be cached at `storage/streams/default/builder/default-module`.
7676

7777
**NOTE**: A fields migration file will not be generated as per Pyro 3 default `make:addon` command behaviour. The builder extension generates a separate fields migration file for each [stream migration](#make-stream) instead.
7878

resources/config/config.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
|
5959
| Where templates are stored in the storage folder
6060
|
61-
| i.e. 'app/storage/streams/default/builder'
61+
| i.e. 'storage/streams/default/builder'
6262
|
6363
|
6464
*/

src/Console/Make.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class Make extends \Anomaly\Streams\Platform\Stream\Console\Make
5252
/**
5353
* Execute the console command.
5454
*/
55-
public function fire(AddonCollection $addons)
55+
public function handle(AddonCollection $addons)
5656
{
5757
$schema = $this->argument('schema');
5858
$stream_slug = explode(':', trim($schema))[0];

src/Console/MakeAddon.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function handle(AddonManager $addons, AddonLoader $loader, Repository $co
8383
$this->ignoreJobs = false;
8484
}
8585

86-
parent::fire($addons);
86+
parent::handle($addons, $loader, $config);
8787
}
8888

8989
/**

src/Traits/Registry.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -168,19 +168,19 @@ protected function download($template, $force = false)
168168
'registry' => $this->registry,
169169
'template' => $template, ]);
170170

171-
/* get a temp folder to download the template zip to */
172-
$tmp = $this->getBuilderPath(_config('config.tmp'));
171+
/* get a temp folder to download the template zip to */
172+
$tmp = $this->getBuilderPath(_config('config.tmp'));
173173

174174
try {
175175
/* download the template zip file, show progress, uncompress and remove */
176-
$bar->start(" Downloading '$template' ... ");
176+
$bar->start(" Downloading '$template' ... \n");
177177

178178
$this->files->put($tmp, file_get_contents($src, false, stream_context_create([],
179-
['notification' => function ($notification_code) use ($bar) {
180-
if (in_array($notification_code, [STREAM_NOTIFY_CONNECT, STREAM_NOTIFY_PROGRESS])) {
181-
$bar->advance();
182-
}
183-
}])));
179+
['notification' => function ($notification_code) use ($bar) {
180+
if (in_array($notification_code, [STREAM_NOTIFY_CONNECT, STREAM_NOTIFY_PROGRESS])) {
181+
$bar->advance();
182+
}
183+
}])));
184184
$this->zip->open($tmp);
185185
$this->zip->extractTo($dist);
186186
$this->zip->close();

0 commit comments

Comments
 (0)