FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
aether/tools/get-modified-packages.php at master · aetherphp/aether · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
aetherphp
/
aether
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
2
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
aether
/
tools
/
get-modified-packages.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
38 lines (30 loc) · 1.08 KB
Breadcrumbs
aether
/
tools
/
get-modified-packages.php
Copy path
File metadata and controls
executable file
·
38 lines (30 loc) · 1.08 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
declare
(strict_types=
1
);
/*
* This file is part of the aether/aether.
*
* Copyright (C) 2024-2025 Dominik Szamburski
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
$
packages
=
\explode
(
PHP_EOL
,
\trim
(
\shell_exec
(
"
git diff HEAD --name-only packages/
"
) ??
''
));
$
modifiedPackages
= [];
foreach
(
$
packages
as
$
package
) {
$
directory
=
\explode
(
DIRECTORY_SEPARATOR
,
$
package
)[
1
] ??
''
;
if
(
empty
(
$
directory
)) {
continue
;
}
$
composerFile
=
\dirname
(
__DIR__
) .
DIRECTORY_SEPARATOR
.
'
packages
'
.
DIRECTORY_SEPARATOR
.
$
directory
.
DIRECTORY_SEPARATOR
.
'
composer.json
'
;
$
composerData
=
\json_decode
(
\file_get_contents
(
$
composerFile
));
if
(!
$
composerData
->
name
) {
continue
;
}
$
modifiedPackages
[
$
composerData
->
name
] = [
'
name
'
=>
$
composerData
->
name
,
'
repository_name
'
=>
\str_replace
(
'
/
'
,
'
-
'
,
$
composerData
->
name
),
'
package_directory
'
=>
$
directory
,
];
}
$
output
= [];
$
output
[
'
include
'
] =
$
modifiedPackages
;
echo
\json_encode
(
$
output
);
Back
|
FazBrowse Home
|
New Git URL