Skip to content

Commit 9d3c3ea

Browse files
committed
tweak how autoloaders are called. adjust phpunit bootstrap.
1 parent d193986 commit 9d3c3ea

File tree

4 files changed

+36
-37
lines changed

4 files changed

+36
-37
lines changed

artisan

+2-18
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
/*
55
|--------------------------------------------------------------------------
6-
| Register The Composer Auto Loader
6+
| Register The Auto Loader
77
|--------------------------------------------------------------------------
88
|
99
| Composer provides a convenient, automatically generated class loader
@@ -13,23 +13,7 @@
1313
|
1414
*/
1515

16-
require __DIR__.'/vendor/autoload.php';
17-
18-
/*
19-
|--------------------------------------------------------------------------
20-
| Register The Workbench Loaders
21-
|--------------------------------------------------------------------------
22-
|
23-
| The Laravel workbench provides a convenient place to develop packages
24-
| when working locally. However we will need to load in the Composer
25-
| auto-load files for the packages so that these can be used here.
26-
|
27-
*/
28-
29-
if (is_dir($workbench = __DIR__.'/workbench'))
30-
{
31-
Illuminate\Workbench\Starter::start($workbench);
32-
}
16+
require __DIR__.'/bootstrap/autoload.php';
3317

3418
/*
3519
|--------------------------------------------------------------------------

bootstrap/autoload.php

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
/*
4+
|--------------------------------------------------------------------------
5+
| Register The Composer Auto Loader
6+
|--------------------------------------------------------------------------
7+
|
8+
| Composer provides a convenient, automatically generated class loader
9+
| for our application. We just need to utilize it! We'll require it
10+
| into the script here so that we do not have to worry about the
11+
| loading of any our classes "manually". Feels great to relax.
12+
|
13+
*/
14+
15+
require __DIR__.'/../vendor/autoload.php';
16+
17+
/*
18+
|--------------------------------------------------------------------------
19+
| Register The Workbench Loaders
20+
|--------------------------------------------------------------------------
21+
|
22+
| The Laravel workbench provides a convenient place to develop packages
23+
| when working locally. However we will need to load in the Composer
24+
| auto-load files for the packages so that these can be used here.
25+
|
26+
*/
27+
28+
if (is_dir($workbench = __DIR__.'/../workbench'))
29+
{
30+
Illuminate\Workbench\Starter::start($workbench);
31+
}

phpunit.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit backupGlobals="false"
33
backupStaticAttributes="false"
4-
bootstrap="vendor/autoload.php"
4+
bootstrap="bootstrap/autoload.php"
55
colors="true"
66
convertErrorsToExceptions="true"
77
convertNoticesToExceptions="true"

public/index.php

+2-18
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
/*
1212
|--------------------------------------------------------------------------
13-
| Register The Composer Auto Loader
13+
| Register The Auto Loader
1414
|--------------------------------------------------------------------------
1515
|
1616
| Composer provides a convenient, automatically generated class loader
@@ -20,23 +20,7 @@
2020
|
2121
*/
2222

23-
require __DIR__.'/../vendor/autoload.php';
24-
25-
/*
26-
|--------------------------------------------------------------------------
27-
| Register The Workbench Loaders
28-
|--------------------------------------------------------------------------
29-
|
30-
| The Laravel workbench provides a convenient place to develop packages
31-
| when working locally. However we will need to load in the Composer
32-
| auto-load files for the packages so that these can be used here.
33-
|
34-
*/
35-
36-
if (is_dir($workbench = __DIR__.'/../workbench'))
37-
{
38-
Illuminate\Workbench\Starter::start($workbench);
39-
}
23+
require __DIR__.'/../bootstrap/autoload.php';
4024

4125
/*
4226
|--------------------------------------------------------------------------

0 commit comments

Comments
 (0)