Skip to content

Commit 171f65d

Browse files
Merge branch '8.x' into 9.x
2 parents 3a0f829 + 2246744 commit 171f65d

File tree

18 files changed

+2287
-94
lines changed

18 files changed

+2287
-94
lines changed

.github/workflows/pull-requests.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Pull Requests
2+
3+
# Credit: https://github.com/github/docs/blob/main/.github/workflows/notify-when-maintainers-cannot-edit.yaml
4+
5+
on:
6+
pull_request_target:
7+
types:
8+
- opened
9+
10+
permissions:
11+
pull-requests: write
12+
13+
jobs:
14+
uneditable:
15+
if: github.repository == 'laravel/framework'
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
19+
with:
20+
script: |
21+
const query = `
22+
query($number: Int!) {
23+
repository(owner: "laravel", name: "framework") {
24+
pullRequest(number: $number) {
25+
headRepositoryOwner {
26+
login
27+
}
28+
maintainerCanModify
29+
}
30+
}
31+
}
32+
`;
33+
34+
const pullNumber = context.issue.number;
35+
const variables = { number: pullNumber };
36+
37+
try {
38+
console.log(`Check laravel/framework#${pullNumber} for maintainer edit access ...`);
39+
40+
const result = await github.graphql(query, variables);
41+
42+
console.log(JSON.stringify(result, null, 2));
43+
44+
const pullRequest = result.repository.pullRequest;
45+
46+
if (pullRequest.headRepositoryOwner.login === 'laravel') {
47+
console.log('PR owned by laravel');
48+
49+
return;
50+
}
51+
52+
if (!pullRequest.maintainerCanModify) {
53+
console.log('PR not owned by Laravel and does not have maintainer edits enabled');
54+
55+
await github.issues.createComment({
56+
issue_number: pullNumber,
57+
owner: 'laravel',
58+
repo: 'framework',
59+
body: "Thanks for submitting a PR!\n\nIn order to review and merge PRs most efficiently, we require that all PRs grant maintainer edit access before we review them. For information on how to do this, [see the relevant GitHub documentation](https://docs.github.com/en/github/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork)."
60+
});
61+
}
62+
} catch(e) {
63+
console.log(e);
64+
}

CHANGELOG-8.x.md

Lines changed: 2013 additions & 0 deletions
Large diffs are not rendered by default.

src/Illuminate/Container/Container.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -886,10 +886,6 @@ public function build($concrete)
886886
return $this->notInstantiable($concrete);
887887
}
888888

889-
// if (in_array($concrete, $this->buildStack)) {
890-
// throw new CircularDependencyException("Circular dependency detected while resolving [{$concrete}].");
891-
// }
892-
893889
$this->buildStack[] = $concrete;
894890

895891
$constructor = $reflector->getConstructor();

src/Illuminate/Database/Connectors/PostgresConnector.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ public function connect(array $config)
3333
$this->getDsn($config), $config, $this->getOptions($config)
3434
);
3535

36+
$this->configureIsolationLevel($connection, $config);
37+
3638
$this->configureEncoding($connection, $config);
3739

3840
// Next, we will check to see if a timezone has been specified in this config
@@ -52,6 +54,20 @@ public function connect(array $config)
5254
return $connection;
5355
}
5456

57+
/**
58+
* Set the connection transaction isolation level.
59+
*
60+
* @param \PDO $connection
61+
* @param array $config
62+
* @return void
63+
*/
64+
protected function configureIsolationLevel($connection, array $config)
65+
{
66+
if (isset($config['isolation_level'])) {
67+
$connection->prepare("set session characteristics as transaction isolation level {$config['isolation_level']}")->execute();
68+
}
69+
}
70+
5571
/**
5672
* Set the connection character set and collation.
5773
*

src/Illuminate/Database/Query/Builder.php

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -205,15 +205,6 @@ class Builder implements BuilderContract
205205
'not similar to', 'not ilike', '~~*', '!~~*',
206206
];
207207

208-
/**
209-
* All of the available bit operators.
210-
*
211-
* @var string[]
212-
*/
213-
public $bitOperators = [
214-
'&', '|', '^', '<<', '>>', '&~',
215-
];
216-
217208
/**
218209
* Whether to use write pdo for the select.
219210
*
@@ -767,10 +758,6 @@ public function where($column, $operator = null, $value = null, $boolean = 'and'
767758
}
768759
}
769760

770-
if ($this->isBitOperator($operator)) {
771-
$type = 'Bit';
772-
}
773-
774761
// Now that we are working with just a simple query we can put the elements
775762
// in our array and add the query binding to our array of bindings that
776763
// will be bound to each SQL statements when it is finally executed.
@@ -854,18 +841,6 @@ protected function invalidOperator($operator)
854841
! in_array(strtolower($operator), $this->grammar->getOperators(), true);
855842
}
856843

857-
/**
858-
* Determine if the operator is a bit operator.
859-
*
860-
* @param string $operator
861-
* @return bool
862-
*/
863-
protected function isBitOperator($operator)
864-
{
865-
return in_array(strtolower($operator), $this->bitOperators, true) ||
866-
in_array(strtolower($operator), $this->grammar->getBitOperators(), true);
867-
}
868-
869844
/**
870845
* Add an "or where" clause to the query.
871846
*
@@ -1952,10 +1927,6 @@ public function having($column, $operator = null, $value = null, $boolean = 'and
19521927
[$value, $operator] = [$operator, '='];
19531928
}
19541929

1955-
if ($this->isBitOperator($operator)) {
1956-
$type = 'bit';
1957-
}
1958-
19591930
$this->havings[] = compact('type', 'column', 'operator', 'value', 'boolean');
19601931

19611932
if (! $value instanceof Expression) {

src/Illuminate/Database/Query/Grammars/Grammar.php

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@ class Grammar extends BaseGrammar
1818
*/
1919
protected $operators = [];
2020

21-
/**
22-
* The grammar specific bit operators.
23-
*
24-
* @var array
25-
*/
26-
protected $bitOperators = [];
27-
2821
/**
2922
* The components that make up a select clause.
3023
*
@@ -262,22 +255,6 @@ protected function whereBasic(Builder $query, $where)
262255
return $this->wrap($where['column']).' '.$operator.' '.$value;
263256
}
264257

265-
/**
266-
* Compile a bit operator where clause.
267-
*
268-
* @param \Illuminate\Database\Query\Builder $query
269-
* @param array $where
270-
* @return string
271-
*/
272-
protected function whereBit(Builder $query, $where)
273-
{
274-
$value = $this->parameter($where['value']);
275-
276-
$operator = str_replace('?', '??', $where['operator']);
277-
278-
return '('.$this->wrap($where['column']).' '.$operator.' '.$value.') != 0';
279-
}
280-
281258
/**
282259
* Compile a "where in" clause.
283260
*
@@ -1354,14 +1331,4 @@ public function getOperators()
13541331
{
13551332
return $this->operators;
13561333
}
1357-
1358-
/**
1359-
* Get the grammar specific bit operators.
1360-
*
1361-
* @return array
1362-
*/
1363-
public function getBitOperators()
1364-
{
1365-
return $this->bitOperators;
1366-
}
13671334
}

src/Illuminate/Foundation/Console/ServeCommand.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ protected function startProcess($hasEnvironment)
112112
'LARAVEL_SAIL',
113113
'PHP_CLI_SERVER_WORKERS',
114114
'PHP_IDE_CONFIG',
115+
'SYSTEMROOT',
115116
'XDEBUG_CONFIG',
116117
'XDEBUG_MODE',
117118
'XDEBUG_SESSION',

src/Illuminate/Http/Client/PendingRequest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@
1313
use Illuminate\Http\Client\Events\ResponseReceived;
1414
use Illuminate\Support\Collection;
1515
use Illuminate\Support\Str;
16+
use Illuminate\Support\Traits\Conditionable;
1617
use Illuminate\Support\Traits\Macroable;
1718
use Psr\Http\Message\MessageInterface;
1819
use Symfony\Component\VarDumper\VarDumper;
1920

2021
class PendingRequest
2122
{
22-
use Macroable;
23+
use Conditionable, Macroable;
2324

2425
/**
2526
* The factory instance.

src/Illuminate/Support/Facades/Blade.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @method static bool check(string $name, array ...$parameters)
1010
* @method static string compileString(string $value)
1111
* @method static string render(string $string, array $data = [], bool $deleteCachedView = false)
12+
* @method static string renderComponent(\Illuminate\View\Component $component)
1213
* @method static string getPath()
1314
* @method static string stripParentheses(string $expression)
1415
* @method static void aliasComponent(string $path, string|null $alias = null)

src/Illuminate/Support/Reflector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public static function isParameterSubclassOf($parameter, $className)
137137
$paramClassName = static::getParameterClassName($parameter);
138138

139139
return $paramClassName
140-
&& class_exists($paramClassName)
140+
&& (class_exists($paramClassName) || interface_exists($paramClassName))
141141
&& (new ReflectionClass($paramClassName))->isSubclassOf($className);
142142
}
143143

0 commit comments

Comments
 (0)