Skip to content

Commit 5dff41e

Browse files
committed
Merge remote-tracking branch 'origin/develop' into issue-29
# Conflicts: # config/autoload/local.php.dist # src/App/src/ConfigProvider.php # src/App/src/RoutesDelegator.php
2 parents 037ebca + 0503a30 commit 5dff41e

105 files changed

Lines changed: 2706 additions & 867 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,7 @@ package-lock.json
5252
**/.DS_Store
5353

5454
public/uploads/
55+
56+
# Generated by bin/generate-packages (daily cron); not tracked so it never conflicts on pull
57+
/public/packages.json
58+
/public/packages.json.tmp

bin/generate-packages

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
/**
5+
* Rebuilds the Dotkernel packages listing from the GitHub organisation.
6+
*
7+
* Intended to run from cron, e.g. daily:
8+
* 0 4 * * * cd /path/to/dotkernel.com && /usr/bin/php bin/generate-packages >> log/generate-packages.log 2>&1
9+
*
10+
* Exits non-zero without touching the data file when the run cannot be trusted, so the
11+
* previously generated listing keeps serving.
12+
*/
13+
14+
declare(strict_types=1);
15+
16+
use Light\App\Service\PackageGenerator;
17+
18+
chdir(__DIR__ . '/../');
19+
20+
require 'vendor/autoload.php';
21+
22+
$container = require 'config/container.php';
23+
$packageGenerator = $container->get(PackageGenerator::class);
24+
25+
try {
26+
$report = $packageGenerator->write();
27+
} catch (Throwable $exception) {
28+
fwrite(STDERR, sprintf(
29+
'[%s] generate-packages failed: %s%s',
30+
date('c'),
31+
$exception->getMessage(),
32+
PHP_EOL
33+
));
34+
exit(1);
35+
}
36+
37+
printf(
38+
'[%s] Done. %d package%s written to %s%s',
39+
date('c'),
40+
$report['written'],
41+
$report['written'] === 1 ? '' : 's',
42+
$packageGenerator->getDataFile(),
43+
PHP_EOL
44+
);
45+
46+
if ($report['skipped'] !== []) {
47+
printf('Skipped by ignoreRepos: %s%s', implode(', ', $report['skipped']), PHP_EOL);
48+
}
49+
50+
if ($report['ignoredMisses'] !== []) {
51+
printf(
52+
'WARNING: ignoreRepos entries matched nothing (renamed or deleted?): %s%s',
53+
implode(', ', $report['ignoredMisses']),
54+
PHP_EOL
55+
);
56+
}
57+
58+
foreach ($report['warnings'] as $warning) {
59+
printf('WARNING: %s%s', $warning, PHP_EOL);
60+
}

bin/update-path-opengraph-images

Lines changed: 0 additions & 118 deletions
This file was deleted.

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
},
2828
"require": {
2929
"php": "~8.5.0",
30+
"ext-curl": "*",
3031
"ext-dom": "*",
3132
"doctrine/data-fixtures": "^2.2",
3233
"doctrine/doctrine-fixtures-bundle": "^4.3",

config/autoload/local.php.dist

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,27 @@ return [
5959
'feed' => [
6060
'path' => realpath(__DIR__ . '/../../public/feed.xml'),
6161
],
62+
/**
63+
* Credentials for `bin/generate-packages`. Reading public repositories needs no token
64+
* scopes at all; without a token the generator still runs, at a lower rate limit.
65+
* Non-credential settings (ignore list, output path) live in `packages.global.php`.
66+
*/
67+
'github' => [
68+
'userAgent' => 'dotkernel.com',
69+
'authBearer' => '',
70+
'org' => 'dotkernel',
71+
],
6272
'sitemap' => [
6373
'path' => realpath(__DIR__ . '/../../public/sitemap.xml'),
6474
],
75+
// `dotkernel-packages-oss-lifecycle` is intentionally absent: it has a dedicated handler
76+
// and is routed in Light\App\RoutesDelegator. Re-adding it here registers the path twice.
6577
'routes' => [
6678
'page' => [
67-
'contact' => 'contact',
68-
'dotkernel-packages-oss-lifecycle' => 'dotkernel-packages-oss-lifecycle',
79+
'contact' => 'contact',
6980
],
7081
],
71-
'twig' => [
82+
'twig' => [
7283
'globals' => [
7384
'app' => $app,
7485
],
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<?php
2+
3+
/**
4+
* Dotkernel packages listing.
5+
*
6+
* Consumed by `bin/generate-packages`, which queries the GitHub organisation and writes the
7+
* result to `dataFile`. Credentials are intentionally NOT stored here - the GitHub token lives
8+
* in `config/autoload/local.php` under the `github` key, which is ignored by git.
9+
*
10+
* `local.php` is merged after every `*.global.php`, so any value below can be overridden locally.
11+
*/
12+
13+
declare(strict_types=1);
14+
15+
return [
16+
'packages' => [
17+
/**
18+
* ignored repositories
19+
* matched on the bare repository name (case-insensitive)
20+
*/
21+
'ignoreRepos' => [
22+
'.github',
23+
'admin',
24+
'admin-documentation',
25+
'apidemia.com',
26+
'api',
27+
'api-documentation',
28+
'app-packages',
29+
'api-tools-migration',
30+
'core',
31+
'development',
32+
'documentation',
33+
'documentation-theme',
34+
'dotboost',
35+
'dotkernel',
36+
'dotkernel.com',
37+
'dotkernel.github.io',
38+
'dotkernel.org',
39+
'dotkernel-v1',
40+
'dot-opensearch',
41+
'dot-privy',
42+
'dot-queue',
43+
'dot-sso-entra',
44+
'frontend',
45+
'frontend-documentation',
46+
'fullview',
47+
'headless-documentation',
48+
'light',
49+
'light-documentation',
50+
'mezzio-hal',
51+
'ng-admin',
52+
'ngx-admin',
53+
'php-llm-examples',
54+
'pingu',
55+
'plugin-mail-transporter',
56+
'pong',
57+
'presentation',
58+
'queue',
59+
'queue-documentation',
60+
'template',
61+
'template-expressive',
62+
'tutorial-101',
63+
'vue',
64+
'workflow-automatic-releases',
65+
'workflow-continuous-integration',
66+
'workshops',
67+
'ws-entities-collections',
68+
'zend',
69+
'zend-expressive-hal',
70+
'zf1',
71+
],
72+
'dataFile' => __DIR__ . '/../../public/packages.json',
73+
'includeArchived' => true,
74+
'timeout' => 10,
75+
'connectTimeout' => 5,
76+
],
77+
];

public/css/app.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
50.8 KB
44.9 KB
47.5 KB

0 commit comments

Comments
 (0)