Skip to content

Commit

Permalink
Merge branch 'master' into 2.x-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Dec 22, 2024
2 parents 8c11d39 + 464bb8b commit 1e1baf6
Show file tree
Hide file tree
Showing 31 changed files with 1,108 additions and 303 deletions.
56 changes: 35 additions & 21 deletions .github/workflows/split-monorepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,21 @@ jobs:
- name: Commit and push changes
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
COMMIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
run: |
cd hyde
if ! [[ `git status --porcelain` ]]; then
echo "No changes to this package. Exiting gracefully.";
exit 0;
fi
git config user.name github-actions
git config user.email github-actions@github.com
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/hyde.git
git add .
git commit -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git commit --author="$COMMIT_AUTHOR_NAME <$COMMIT_AUTHOR_EMAIL>" -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git push upstream develop
echo "No changes to this package. Exiting gracefully."
Expand Down Expand Up @@ -114,19 +116,21 @@ jobs:
- name: Commit and push changes
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
COMMIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
run: |
cd framework
if ! [[ `git status --porcelain` ]]; then
echo "No changes to this package. Exiting gracefully.";
exit 0;
fi
git config user.name github-actions
git config user.email github-actions@github.com
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/framework.git
git add .
git commit -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git commit --author="$COMMIT_AUTHOR_NAME <$COMMIT_AUTHOR_EMAIL>" -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git push upstream develop
echo "No changes to this package. Exiting gracefully."
Expand Down Expand Up @@ -163,19 +167,21 @@ jobs:
- name: Commit and push changes
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
COMMIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
run: |
cd realtime-compiler
if ! [[ `git status --porcelain` ]]; then
echo "No changes to this package. Exiting gracefully.";
exit 0;
fi
git config user.name github-actions
git config user.email github-actions@github.com
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/realtime-compiler.git
git add .
git commit -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git commit --author="$COMMIT_AUTHOR_NAME <$COMMIT_AUTHOR_EMAIL>" -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git push upstream master
Expand Down Expand Up @@ -211,19 +217,21 @@ jobs:
- name: Commit and push changes
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
COMMIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
run: |
cd hydefront
if ! [[ `git status --porcelain` ]]; then
echo "No changes to this package. Exiting gracefully.";
exit 0;
fi
git config user.name github-actions
git config user.email github-actions@github.com
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/hydefront.git
git add .
git commit -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git commit --author="$COMMIT_AUTHOR_NAME <$COMMIT_AUTHOR_EMAIL>" -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git push upstream master
Expand Down Expand Up @@ -263,19 +271,21 @@ jobs:
- name: Commit and push changes
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
COMMIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
run: |
cd website
if ! [[ `git status --porcelain` ]]; then
echo "No changes to this package. Exiting gracefully.";
exit 0;
fi
git config user.name github-actions
git config user.email github-actions@github.com
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/hydephp.com.git
git add .
git commit -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git commit --author="$COMMIT_AUTHOR_NAME <$COMMIT_AUTHOR_EMAIL>" -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git push upstream upcoming
echo "No changes to this package. Exiting gracefully."
Expand Down Expand Up @@ -312,19 +322,21 @@ jobs:
- name: Commit and push changes
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
COMMIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
run: |
cd testing
if ! [[ `git status --porcelain` ]]; then
echo "No changes to this package. Exiting gracefully.";
exit 0;
fi
git config user.name github-actions
git config user.email github-actions@github.com
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/testing.git
git add .
git commit -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git commit --author="$COMMIT_AUTHOR_NAME <$COMMIT_AUTHOR_EMAIL>" -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git push upstream master
Expand Down Expand Up @@ -360,6 +372,8 @@ jobs:
- name: Commit and push changes
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
COMMIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
run: |
cd ui-kit
Expand All @@ -368,11 +382,11 @@ jobs:
exit 0;
fi
git config user.name github-actions
git config user.email github-actions@github.com
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/ui-kit.git
git add .
git commit -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git commit --author="$COMMIT_AUTHOR_NAME <$COMMIT_AUTHOR_EMAIL>" -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git push upstream master
29 changes: 15 additions & 14 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<section id="hyde-kernel-string-methods">

<!-- Start generated docs for Hyde\Foundation\Concerns\ImplementsStringHelpers -->
<!-- Generated by HydePHP DocGen script at 2023-03-11 11:17:34 in 0.07ms -->
<!-- Generated by HydePHP DocGen script at 2024-12-22 09:14:25 in 0.07ms -->

#### `makeTitle()`

Expand All @@ -11,6 +11,14 @@ No description provided.
Hyde::makeTitle(string $value): string
```

#### `makeSlug()`

No description provided.

```php
Hyde::makeSlug(string $value): string
```

#### `normalizeNewlines()`

No description provided.
Expand Down
10 changes: 9 additions & 1 deletion docs/architecture-concepts/the-hydekernel.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ Hyde::routes(): Hyde\Foundation\Kernel\RouteCollection
<section id="hyde-kernel-string-methods">

<!-- Start generated docs for Hyde\Foundation\Concerns\ImplementsStringHelpers -->
<!-- Generated by HydePHP DocGen script at 2023-03-11 11:17:34 in 0.07ms -->
<!-- Generated by HydePHP DocGen script at 2024-12-22 09:14:25 in 0.07ms -->

#### `makeTitle()`

Expand All @@ -150,6 +150,14 @@ No description provided.
Hyde::makeTitle(string $value): string
```

#### `makeSlug()`

No description provided.

```php
Hyde::makeSlug(string $value): string
```

#### `normalizeNewlines()`

No description provided.
Expand Down
22 changes: 22 additions & 0 deletions monorepo/HydeStan/HydeStan.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ final class HydeStan
private const FILE_ANALYSERS = [
NoFixMeAnalyser::class,
UnImportedFunctionAnalyser::class,
NoGlobBraceAnalyser::class,
];

private const TEST_FILE_ANALYSERS = [
Expand Down Expand Up @@ -370,6 +371,27 @@ public function run(string $file, string $contents): void
}
}

class NoGlobBraceAnalyser extends FileAnalyser
{
public function run(string $file, string $contents): void
{
$lines = explode("\n", $contents);

foreach ($lines as $lineNumber => $line) {
AnalysisStatisticsContainer::analysedExpression();

if (str_contains($line, 'GLOB_BRACE')) {
$this->fail(sprintf('Usage of `GLOB_BRACE` found in %s at line %d. This feature is not supported on all systems and should be avoided.',
realpath(BASE_PATH.'/'.$file),
$lineNumber + 1
));

HydeStan::addActionsMessage('error', $file, $lineNumber + 1, 'HydeStan: NoGlobBraceError', '`GLOB_BRACE` is not supported on all systems. Consider refactoring to avoid it.');
}
}
}
}

class NoTestReferenceAnalyser extends LineAnalyser
{
public function run(string $file, int $lineNumber, string $line): void
Expand Down
Loading

0 comments on commit 1e1baf6

Please sign in to comment.