Skip to content

Commit f49071f

Browse files
committed
fix
2 parents ba68f5b + cf2644f commit f49071f

File tree

10 files changed

+33
-17
lines changed

10 files changed

+33
-17
lines changed

CHANGELOG-7.x.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Release Notes for 7.x
22

3-
## [Unreleased](https://github.com/laravel/framework/compare/v7.13.0...7.x)
3+
## [Unreleased](https://github.com/laravel/framework/compare/v7.14.0...7.x)
4+
5+
### Added
6+
- Added missing `symfony/mime` suggest ([#33067](https://github.com/laravel/framework/pull/33067))
7+
8+
9+
## [v7.14.0 (2020-06-02)](https://github.com/laravel/framework/compare/v7.13.0...v7.14.0)
410

511
### Added
612
- Views: make attributes available within render method ([#32978](https://github.com/laravel/framework/pull/32978))
@@ -9,6 +15,7 @@
915
- Added `Illuminate\Http\Client\Request::toPsrRequest()` ([#33016](https://github.com/laravel/framework/pull/33016))
1016
- Added `Illuminate\Support\MessageBag::addIf()` method ([50efe09](https://github.com/laravel/framework/commit/50efe099b59e75563298deb992017b4cabfb021d))
1117
- Provide `psr/container-implementation` ([#33020](https://github.com/laravel/framework/pull/33020))
18+
- Support PHP 8's reflection API ([#33039](https://github.com/laravel/framework/pull/33039), [6018c1d](https://github.com/laravel/framework/commit/6018c1d18e7b764c17307c1f98d64482a00a668d))
1219

1320
### Fixed
1421
- Restore `app()->getCached*Path()` absolute '/' behavior in Windows ([#32969](https://github.com/laravel/framework/pull/32969))
@@ -20,6 +27,7 @@
2027

2128
### Changed
2229
- Use new line for `route:list` middleware ([#32993](https://github.com/laravel/framework/pull/32993))
30+
- Disallow generation commands with reserved names ([#33037](https://github.com/laravel/framework/pull/33037))
2331

2432

2533
## [v7.13.0 (2020-05-26)](https://github.com/laravel/framework/compare/v7.12.0...v7.13.0)

src/Illuminate/Bus/Queueable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ protected function serializeJob($job)
164164
if ($job instanceof Closure) {
165165
if (! class_exists(CallQueuedClosure::class)) {
166166
throw new RuntimeException(
167-
'To enable support for closure jobs, please install illuminate/queue.'
167+
'To enable support for closure jobs, please install the illuminate/queue package.'
168168
);
169169
}
170170

src/Illuminate/Bus/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
}
3131
},
3232
"suggest": {
33-
"illuminate/queue": "Required to use closures when chaining jobs (^7.0)"
33+
"illuminate/queue": "Required to use closures when chaining jobs (^7.0)."
3434
},
3535
"config": {
3636
"sort-packages": true

src/Illuminate/Console/composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333
"suggest": {
3434
"dragonmantank/cron-expression": "Required to use scheduler (^2.0).",
3535
"guzzlehttp/guzzle": "Required to use the ping methods on schedules (^6.3.1|^7.0).",
36-
"illuminate/bus": "Required to use the scheduled job dispatcher (^7.0)",
37-
"illuminate/container": "Required to use the scheduler (^7.0)",
38-
"illuminate/filesystem": "Required to use the generator command (^7.0)",
39-
"illuminate/queue": "Required to use closures for scheduled jobs (^7.0)"
36+
"illuminate/bus": "Required to use the scheduled job dispatcher (^7.0).",
37+
"illuminate/container": "Required to use the scheduler (^7.0).",
38+
"illuminate/filesystem": "Required to use the generator command (^7.0).",
39+
"illuminate/queue": "Required to use closures for scheduled jobs (^7.0)."
4040
},
4141
"config": {
4242
"sort-packages": true

src/Illuminate/Filesystem/Filesystem.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use FilesystemIterator;
77
use Illuminate\Contracts\Filesystem\FileNotFoundException;
88
use Illuminate\Support\Traits\Macroable;
9+
use RuntimeException;
910
use Symfony\Component\Finder\Finder;
1011
use Symfony\Component\Mime\MimeTypes;
1112

@@ -321,6 +322,12 @@ public function extension($path)
321322
*/
322323
public function guessExtension($path)
323324
{
325+
if (! class_exists(MimeTypes::class)) {
326+
throw new RuntimeException(
327+
'To enable support for guessing extensions, please install the symfony/mime package.'
328+
);
329+
}
330+
324331
return (new MimeTypes)->getExtensions($this->mimeType($path))[0] ?? null;
325332
}
326333

src/Illuminate/Filesystem/composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@
3030
}
3131
},
3232
"suggest": {
33-
"illuminate/http": "Required for handling uploaded files (^7.0)",
33+
"illuminate/http": "Required for handling uploaded files (^7.0).",
3434
"league/flysystem": "Required to use the Flysystem local and FTP drivers (^1.0.34).",
3535
"league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).",
3636
"league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).",
3737
"league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).",
38-
"psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0)."
38+
"psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).",
39+
"symfony/mime": "Required to enable support for guessing extensions (^5.0)."
3940
},
4041
"config": {
4142
"sort-packages": true

src/Illuminate/Foundation/Console/StorageLinkCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace Illuminate\Foundation\Console;
44

5-
use Exception;
65
use Illuminate\Console\Command;
6+
use RuntimeException;
77
use Symfony\Component\Filesystem\Filesystem as SymfonyFilesystem;
88

99
class StorageLinkCommand extends Command
@@ -67,7 +67,7 @@ protected function links()
6767
protected function getRelativeTarget($link, $target)
6868
{
6969
if (! class_exists(SymfonyFilesystem::class)) {
70-
throw new Exception('Please install the symfony/filesystem Composer package to create relative links.');
70+
throw new RuntimeException('To enable support for relative links, please install the symfony/filesystem package.');
7171
}
7272

7373
return (new SymfonyFilesystem)->makePathRelative($target, dirname($link));

src/Illuminate/Routing/RoutingServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ protected function registerPsrRequest()
137137
->createRequest($app->make('request'));
138138
}
139139

140-
throw new BindingResolutionException('Unable to resolve PSR request. Please install symfony/psr-http-message-bridge and nyholm/psr7.');
140+
throw new BindingResolutionException('Unable to resolve PSR request. Please install the symfony/psr-http-message-bridge and nyholm/psr7 packages.');
141141
});
142142
}
143143

src/Illuminate/Support/Facades/Auth.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Illuminate\Support\Facades;
44

55
use Laravel\Ui\UiServiceProvider;
6-
use LogicException;
6+
use RuntimeException;
77

88
/**
99
* @method static \Illuminate\Auth\AuthManager extend(string $driver, \Closure $callback)
@@ -53,7 +53,7 @@ protected static function getFacadeAccessor()
5353
public static function routes(array $options = [])
5454
{
5555
if (! array_key_exists(UiServiceProvider::class, static::$app->getLoadedProviders())) {
56-
throw new LogicException('Please install the laravel/ui package in order to use the Auth::routes() method.');
56+
throw new RuntimeException('In order to use the Auth::routes() method, please install the laravel/ui package.');
5757
}
5858

5959
static::$app->make('router')->auth($options);

tests/Integration/Support/AuthFacadeTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
namespace Illuminate\Tests\Integration\Support;
44

55
use Illuminate\Support\Facades\Auth;
6-
use LogicException;
76
use Orchestra\Testbench\TestCase;
7+
use RuntimeException;
88

99
class AuthFacadeTest extends TestCase
1010
{
1111
public function testItFailsIfTheUiPackageIsMissing()
1212
{
13-
$this->expectExceptionObject(new LogicException(
14-
'Please install the laravel/ui package in order to use the Auth::routes() method.'
13+
$this->expectExceptionObject(new RuntimeException(
14+
'In order to use the Auth::routes() method, please install the laravel/ui package.'
1515
));
1616

1717
Auth::routes();

0 commit comments

Comments
 (0)