Skip to content

Commit e7d67f4

Browse files
committed
fix conflicts
2 parents 899d3ca + 411d524 commit e7d67f4

File tree

19 files changed

+356
-18
lines changed

19 files changed

+356
-18
lines changed

src/Illuminate/Cache/NullStore.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class NullStore extends TaggableStore implements LockProvider
1212
* Retrieve an item from the cache by key.
1313
*
1414
* @param string $key
15-
* @return mixed
15+
* @return void
1616
*/
1717
public function get($key)
1818
{
@@ -37,7 +37,7 @@ public function put($key, $value, $seconds)
3737
*
3838
* @param string $key
3939
* @param mixed $value
40-
* @return int|bool
40+
* @return bool
4141
*/
4242
public function increment($key, $value = 1)
4343
{
@@ -49,7 +49,7 @@ public function increment($key, $value = 1)
4949
*
5050
* @param string $key
5151
* @param mixed $value
52-
* @return int|bool
52+
* @return bool
5353
*/
5454
public function decrement($key, $value = 1)
5555
{

src/Illuminate/Config/Repository.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function set($key, $value = null)
9999
*/
100100
public function prepend($key, $value)
101101
{
102-
$array = $this->get($key);
102+
$array = $this->get($key, []);
103103

104104
array_unshift($array, $value);
105105

@@ -115,7 +115,7 @@ public function prepend($key, $value)
115115
*/
116116
public function push($key, $value)
117117
{
118-
$array = $this->get($key);
118+
$array = $this->get($key, []);
119119

120120
$array[] = $value;
121121

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
namespace Illuminate\Database\Eloquent\Factories;
4+
5+
use Illuminate\Support\Arr;
6+
7+
class CrossJoinSequence extends Sequence
8+
{
9+
/**
10+
* Create a new cross join sequence instance.
11+
*
12+
* @param array $sequences
13+
* @return void
14+
*/
15+
public function __construct(...$sequences)
16+
{
17+
$crossJoined = array_map(
18+
function ($a) {
19+
return array_merge(...$a);
20+
},
21+
Arr::crossJoin(...$sequences),
22+
);
23+
24+
parent::__construct(...$crossJoined);
25+
}
26+
}

src/Illuminate/Database/Eloquent/Factories/Factory.php

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,17 @@ public function sequence(...$sequence)
494494
return $this->state(new Sequence(...$sequence));
495495
}
496496

497+
/**
498+
* Add a new cross joined sequenced state transformation to the model definition.
499+
*
500+
* @param array $sequence
501+
* @return static
502+
*/
503+
public function crossJoinSequence(...$sequence)
504+
{
505+
return $this->state(new CrossJoinSequence(...$sequence));
506+
}
507+
497508
/**
498509
* Define a child relationship for the model.
499510
*
@@ -678,12 +689,16 @@ public function newModel(array $attributes = [])
678689
public function modelName()
679690
{
680691
$resolver = static::$modelNameResolver ?: function (self $factory) {
692+
$namespacedFactoryBasename = Str::replaceLast(
693+
'Factory', '', Str::replaceFirst(static::$namespace, '', get_class($factory))
694+
);
695+
681696
$factoryBasename = Str::replaceLast('Factory', '', class_basename($factory));
682697

683698
$appNamespace = static::appNamespace();
684699

685-
return class_exists($appNamespace.'Models\\'.$factoryBasename)
686-
? $appNamespace.'Models\\'.$factoryBasename
700+
return class_exists($appNamespace.'Models\\'.$namespacedFactoryBasename)
701+
? $appNamespace.'Models\\'.$namespacedFactoryBasename
687702
: $appNamespace.$factoryBasename;
688703
};
689704

src/Illuminate/Foundation/Console/ServeCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,10 @@ protected function startProcess($hasEnvironment)
111111
'APP_ENV',
112112
'LARAVEL_SAIL',
113113
'PHP_CLI_SERVER_WORKERS',
114+
'PHP_IDE_CONFIG',
114115
'XDEBUG_CONFIG',
115116
'XDEBUG_MODE',
117+
'XDEBUG_SESSION',
116118
]) ? [$key => $value] : [$key => false];
117119
})->all());
118120

src/Illuminate/Queue/Queue.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ protected function createPayload($job, $queue, $data = '')
102102
$job = CallQueuedClosure::create($job);
103103
}
104104

105-
$payload = json_encode($this->createPayloadArray($job, $queue, $data));
105+
$payload = json_encode($this->createPayloadArray($job, $queue, $data), \JSON_UNESCAPED_UNICODE);
106106

107107
if (JSON_ERROR_NONE !== json_last_error()) {
108108
throw new InvalidPayloadException(

src/Illuminate/Queue/QueueServiceProvider.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,11 @@ protected function registerFailedJobServices()
235235
$this->app->singleton('queue.failer', function ($app) {
236236
$config = $app['config']['queue.failed'];
237237

238+
if (array_key_exists('driver', $config) &&
239+
(is_null($config['driver']) || $config['driver'] === 'null')) {
240+
return new NullFailedJobProvider;
241+
}
242+
238243
if (isset($config['driver']) && $config['driver'] === 'dynamodb') {
239244
return $this->dynamoFailedJobProvider($config);
240245
} elseif (isset($config['driver']) && $config['driver'] === 'database-uuids') {

src/Illuminate/Support/Str.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,19 @@ public static function ascii($value, $language = 'en')
9999
return ASCII::to_ascii((string) $value, $language);
100100
}
101101

102+
/**
103+
* Transliterate a string to its closest ASCII representation.
104+
*
105+
* @param string $string
106+
* @param string|null $unknown
107+
* @param bool|null $strict
108+
* @return string
109+
*/
110+
public static function transliterate($string, $unknown = '?', $strict = false)
111+
{
112+
return ASCII::to_transliterate($string, $unknown, $strict);
113+
}
114+
102115
/**
103116
* Get the portion of a string before the first occurrence of a given value.
104117
*

src/Illuminate/Support/Stringable.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -779,11 +779,11 @@ public function ucfirst()
779779
/**
780780
* Split a string by uppercase characters.
781781
*
782-
* @return static
782+
* @return \Illuminate\Support\Collection
783783
*/
784784
public function ucsplit()
785785
{
786-
return new static(Str::ucsplit($this->value));
786+
return collect(Str::ucsplit($this->value));
787787
}
788788

789789
/**

src/Illuminate/Support/Testing/Fakes/BusFake.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ public function assertDispatchedAfterResponse($command, $callback = null)
223223

224224
PHPUnit::assertTrue(
225225
$this->dispatchedAfterResponse($command, $callback)->count() > 0,
226-
"The expected [{$command}] job was not dispatched for after sending the response."
226+
"The expected [{$command}] job was not dispatched after sending the response."
227227
);
228228
}
229229

@@ -259,7 +259,7 @@ public function assertNotDispatchedAfterResponse($command, $callback = null)
259259

260260
PHPUnit::assertCount(
261261
0, $this->dispatchedAfterResponse($command, $callback),
262-
"The unexpected [{$command}] job was dispatched for after sending the response."
262+
"The unexpected [{$command}] job was dispatched after sending the response."
263263
);
264264
}
265265

0 commit comments

Comments
 (0)