Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 1 addition & 10 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,4 @@ jobs:
run: php ./tempest discovery:status

- name: Execute tests
run: php -d"error_reporting = E_ALL & ~E_DEPRECATED" -dmemory_limit=1G vendor/bin/phpunit --coverage-clover build/reports/clover.xml

# Only upload coverage once.
- if: matrix.php == '8.4' && matrix.database == 'sqlite' && matrix.os == 'ubuntu-latest' && matrix.stability == 'prefer-stable'
name: Coveralls
uses: coverallsapp/github-action@v2
continue-on-error: true
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
file: build/reports/clover.xml
run: php -d"error_reporting = E_ALL & ~E_DEPRECATED" -dmemory_limit=1G vendor/bin/phpunit
4 changes: 2 additions & 2 deletions .github/workflows/isolated-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ jobs:
- name: Install dependencies
run: |
./bin/build-changed-packages
cd "src/Tempest/${{ matrix.package.basename }}"
cd "packages/${{ matrix.package.basename }}"
composer update --${{ matrix.stability }} --prefer-dist --no-interaction

- name: Execute tests
run: phpunit -c "src/Tempest/${{ matrix.package.basename }}/phpunit.xml"
run: phpunit -c "packages/${{ matrix.package.basename }}/phpunit.xml"
4 changes: 2 additions & 2 deletions .github/workflows/subsplit-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
if: "!startsWith(github.ref, 'refs/tags/')"
uses: "symplify/[email protected]"
with:
# ↓ split "src/Tempest/Console" directory
# ↓ split "packages/console" directory
package_directory: '${{ matrix.package.directory }}'

# ↓ into https://github.com/tempestphp/tempest-console repository
Expand All @@ -64,7 +64,7 @@ jobs:
with:
tag: ${GITHUB_REF#refs/tags/}

# ↓ split "src/Tempest/Console" directory
# ↓ split "packages/console" directory
package_directory: '${{ matrix.package.directory }}'

# ↓ into https://github.com/tempestphp/tempest-console repository
Expand Down
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
# Top level directories
/log/
/package-lock.json

# Top-level+Sub directories
.cache/
.idea/
build/
sessions/
vendor/
# @TODO(aidan-casey): clean this up
packages/database.sqlite
packages/database/src/database.sqlite
src/Tempest/database.sqlite
tests/Fixtures/database.sqlite
tests/Unit/Console/test-console.log
Expand All @@ -13,7 +21,7 @@ debug.log
tempest.log
public/static
tests/Unit/Log
log/
!packages/log
node_modules
dist
profile/
Expand Down
2 changes: 1 addition & 1 deletion bin/get-packages
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* @link https://github.com/ecotoneframework/ecotone-dev/blob/main/bin/get-packages
*/

const PACKAGES_DIRECTORY = __DIR__ . '/../src/Tempest/';
const PACKAGES_DIRECTORY = __DIR__ . '/../packages/';

function getPackageNameFromComposerFile(string $composerFile)
{
Expand Down
2 changes: 1 addition & 1 deletion bin/get-packages-with-tests
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @link https://github.com/ecotoneframework/ecotone-dev/blob/main/bin/get-packages
*/

const PACKAGES_DIRECTORY = __DIR__ . '/../src/Tempest/';
const PACKAGES_DIRECTORY = __DIR__ . '/../packages/';

function getPackageNameFromComposerFile(string $composerFile)
{
Expand Down
8 changes: 4 additions & 4 deletions bin/release
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ require_once getcwd() . '/vendor/autoload.php';
*/
function bumpKernelVersion(string $version): void
{
$kernel = __DIR__ . '/../src/Tempest/Core/src/Kernel.php';
$kernel = __DIR__ . '/../packages/core/src/Kernel.php';
$content = preg_replace(
pattern: '/public const string VERSION = \'.*\';/',
replacement: "public const string VERSION = '{$version}';",
Expand All @@ -44,7 +44,7 @@ function bumpKernelVersion(string $version): void
*/
function setPhpDependencyVersion(string $package, string $version): void
{
foreach (glob(__DIR__ . '/../src/Tempest/*/composer.json') as $path) {
foreach (glob(__DIR__ . '/../packages/*/composer.json') as $path) {
updateJsonFile(
path: $path,
callback: function (array $content) use ($version, $package) {
Expand All @@ -68,7 +68,7 @@ function bumpPhpPackages(string $version, bool $isMajor): void
// Bumps dependencies
executeCommands("./vendor/bin/monorepo-builder bump-interdependency {$version}");

// Finds all `composer.json` files in `src/Tempest`, and revert the `tempest/highlight` dependency to the saved version
// Finds all `composer.json` files in `packages/`, and revert the `tempest/highlight` dependency to the saved version
setPhpDependencyVersion(
package: 'tempest/highlight',
version: json_decode(file_get_contents(__DIR__ . '/../composer.json'), associative: true)['require']['tempest/highlight'],
Expand All @@ -87,7 +87,7 @@ function cleanUpAfterRelease(): void
// to update back all composer files to use `dev-main` instead of a fixed version.
executeCommands('./vendor/bin/monorepo-builder bump-interdependency dev-main');

// Finds all `composer.json` files in `src/Tempest`, and revert the `tempest/highlight` dependency to the saved version
// Finds all `composer.json` files in `packages/`, and revert the `tempest/highlight` dependency to the saved version
setPhpDependencyVersion(
package: 'tempest/highlight',
version: json_decode(file_get_contents(__DIR__ . '/../composer.json'), associative: true)['require']['tempest/highlight'],
Expand Down
160 changes: 76 additions & 84 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,105 +101,97 @@
"prefer-stable": true,
"autoload": {
"psr-4": {
"Tempest\\Auth\\": "src/Tempest/Auth/src/",
"Tempest\\Cache\\": "src/Tempest/Cache/src/",
"Tempest\\Clock\\": "src/Tempest/Clock/src/",
"Tempest\\CommandBus\\": "src/Tempest/CommandBus/src",
"Tempest\\Console\\": "src/Tempest/Console/src",
"Tempest\\Container\\": "src/Tempest/Container/src",
"Tempest\\Core\\": "src/Tempest/Core/src",
"Tempest\\Database\\": "src/Tempest/Database/src",
"Tempest\\DateTime\\": "src/Tempest/DateTime/src",
"Tempest\\Debug\\": "src/Tempest/Debug/src",
"Tempest\\Discovery\\": "src/Tempest/Discovery/src",
"Tempest\\EventBus\\": "src/Tempest/EventBus/src",
"Tempest\\Auth\\": "packages/auth/src",
"Tempest\\Cache\\": "packages/cache/src",
"Tempest\\Clock\\": "packages/clock/src",
"Tempest\\CommandBus\\": "packages/command-bus/src",
"Tempest\\Console\\": "packages/console/src",
"Tempest\\Container\\": "packages/container/src",
"Tempest\\Core\\": "packages/core/src",
"Tempest\\Database\\": "packages/database/src",
"Tempest\\DateTime\\": "packages/datetime/src",
"Tempest\\Debug\\": "packages/debug/src",
"Tempest\\Discovery\\": "packages/discovery/src",
"Tempest\\EventBus\\": "packages/event-bus/src",
"Tempest\\Framework\\": "src/Tempest/Framework",
"Tempest\\Generation\\": "src/Tempest/Generation/src",
"Tempest\\HttpClient\\": "src/Tempest/HttpClient/src",
"Tempest\\Http\\": "src/Tempest/Http/src",
"Tempest\\Log\\": "src/Tempest/Log/src",
"Tempest\\Mapper\\": "src/Tempest/Mapper/src",
"Tempest\\Reflection\\": "src/Tempest/Reflection/src",
"Tempest\\Router\\": "src/Tempest/Router/src",
"Tempest\\Storage\\": "src/Tempest/Storage/src",
"Tempest\\Support\\": "src/Tempest/Support/src",
"Tempest\\Validation\\": "src/Tempest/Validation/src",
"Tempest\\View\\": "src/Tempest/View/src",
"Tempest\\Vite\\": "src/Tempest/Vite/src"
"Tempest\\Generation\\": "packages/generation/src",
"Tempest\\HttpClient\\": "packages/http-client/src",
"Tempest\\Http\\": "packages/http/src",
"Tempest\\Log\\": "packages/log/src",
"Tempest\\Mapper\\": "packages/mapper/src",
"Tempest\\Reflection\\": "packages/reflection/src",
"Tempest\\Router\\": "packages/router/src",
"Tempest\\Storage\\": "packages/storage/src",
"Tempest\\Support\\": "packages/support/src",
"Tempest\\Validation\\": "packages/validation/src",
"Tempest\\View\\": "packages/view/src",
"Tempest\\Vite\\": "packages/vite/src"
},
"files": [
"src/Tempest/Clock/src/functions.php",
"src/Tempest/CommandBus/src/functions.php",
"src/Tempest/Container/src/functions.php",
"src/Tempest/Core/src/functions.php",
"src/Tempest/Database/src/functions.php",
"src/Tempest/DateTime/src/constants.php",
"src/Tempest/DateTime/src/functions.php",
"src/Tempest/Debug/src/functions.php",
"src/Tempest/EventBus/src/functions.php",
"src/Tempest/Mapper/src/functions.php",
"src/Tempest/Reflection/src/functions.php",
"src/Tempest/Router/src/functions.php",
"src/Tempest/Support/src/Arr/functions.php",
"src/Tempest/Support/src/Comparison/functions.php",
"src/Tempest/Support/src/Filesystem/functions.php",
"src/Tempest/Support/src/Html/functions.php",
"src/Tempest/Support/src/Json/functions.php",
"src/Tempest/Support/src/Language/functions.php",
"src/Tempest/Support/src/Math/constants.php",
"src/Tempest/Support/src/Math/functions.php",
"src/Tempest/Support/src/Namespace/functions.php",
"src/Tempest/Support/src/Path/functions.php",
"src/Tempest/Support/src/Random/functions.php",
"src/Tempest/Support/src/Regex/functions.php",
"src/Tempest/Support/src/Str/constants.php",
"src/Tempest/Support/src/Str/functions.php",
"src/Tempest/Support/src/functions.php",
"src/Tempest/View/src/functions.php",
"src/Tempest/Vite/src/functions.php"
"packages/clock/src/functions.php",
"packages/command-bus/src/functions.php",
"packages/container/src/functions.php",
"packages/core/src/functions.php",
"packages/database/src/functions.php",
"packages/datetime/src/constants.php",
"packages/datetime/src/functions.php",
"packages/debug/src/functions.php",
"packages/event-bus/src/functions.php",
"packages/mapper/src/functions.php",
"packages/reflection/src/functions.php",
"packages/router/src/functions.php",
"packages/support/src/Arr/functions.php",
"packages/support/src/Comparison/functions.php",
"packages/support/src/Filesystem/functions.php",
"packages/support/src/Html/functions.php",
"packages/support/src/Json/functions.php",
"packages/support/src/Language/functions.php",
"packages/support/src/Math/constants.php",
"packages/support/src/Math/functions.php",
"packages/support/src/Namespace/functions.php",
"packages/support/src/Path/functions.php",
"packages/support/src/Random/functions.php",
"packages/support/src/Regex/functions.php",
"packages/support/src/Str/constants.php",
"packages/support/src/Str/functions.php",
"packages/support/src/functions.php",
"packages/view/src/functions.php",
"packages/vite/src/functions.php"
]
},
"autoload-dev": {
"psr-4": {
"Tempest\\Auth\\Tests\\": "src/Tempest/Auth/tests",
"Tempest\\Cache\\Tests\\": "src/Tempest/Cache/tests",
"Tempest\\Clock\\Tests\\": "src/Tempest/Clock/tests",
"Tempest\\CommandBus\\Tests\\": "src/Tempest/CommandBus/tests",
"Tempest\\Console\\Tests\\": "src/Tempest/Console/tests",
"Tempest\\Container\\Tests\\": "src/Tempest/Container/tests",
"Tempest\\Core\\Tests\\": "src/Tempest/Core/tests",
"Tempest\\Database\\Tests\\": "src/Tempest/Database/tests",
"Tempest\\DateTime\\Tests\\": "src/Tempest/DateTime/tests",
"Tempest\\Discovery\\Tests\\": "src/Tempest/Discovery/tests",
"Tempest\\EventBus\\Tests\\": "src/Tempest/EventBus/tests",
"Tempest\\Generation\\Tests\\": "src/Tempest/Generation/tests",
"Tempest\\HttpClient\\Tests\\": "src/Tempest/HttpClient/tests",
"Tempest\\Http\\Tests\\": [
"src/Tempest/Http/tests",
"src/Tempest/Router/tests"
],
"Tempest\\Log\\Tests\\": "src/Tempest/Log/tests",
"Tempest\\Mapper\\Tests\\": "src/Tempest/Mapper/tests",
"Tempest\\Reflection\\Tests\\": "src/Tempest/Reflection/tests",
"Tempest\\Router\\Tests\\": "src/Tempest/Router/tests",
"Tempest\\Storage\\Tests\\": "src/Tempest/Storage/tests",
"Tempest\\Support\\Tests\\": "src/Tempest/Support/tests",
"Tempest\\Validation\\Tests\\": "src/Tempest/Validation/tests",
"Tempest\\View\\Tests\\": "src/Tempest/View/tests",
"Tempest\\Vite\\Tests\\": "src/Tempest/Vite/tests",
"Tests\\Tempest\\": "tests/"
"Tempest\\Cache\\Tests\\": "packages/cache/tests",
"Tempest\\Clock\\Tests\\": "packages/clock/tests",
"Tempest\\CommandBus\\Tests\\": "packages/command-bus/tests",
"Tempest\\Console\\Tests\\": "packages/console/tests",
"Tempest\\Container\\Tests\\": "packages/container/tests",
"Tempest\\Core\\Tests\\": "packages/core/tests",
"Tempest\\Database\\Tests\\": "packages/database/tests",
"Tempest\\DateTime\\Tests\\": "packages/datetime/tests",
"Tempest\\EventBus\\Tests\\": "packages/event-bus/tests",
"Tempest\\Generation\\Tests\\": "packages/generation/tests",
"Tempest\\HttpClient\\Tests\\": "packages/http-client/tests",
"Tempest\\Http\\Tests\\": "packages/http/tests",
"Tempest\\Log\\Tests\\": "packages/log/tests",
"Tempest\\Mapper\\Tests\\": "packages/mapper/tests",
"Tempest\\Reflection\\Tests\\": "packages/reflection/tests",
"Tempest\\Router\\Tests\\": "packages/router/tests",
"Tempest\\Storage\\Tests\\": "packages/storage/tests",
"Tempest\\Support\\Tests\\": "packages/support/tests",
"Tempest\\Validation\\Tests\\": "packages/validation/tests",
"Tempest\\View\\Tests\\": "packages/view/tests",
"Tempest\\Vite\\Tests\\": "packages/vite/tests",
"Tests\\Tempest\\": "tests"
}
},
"bin": [
"src/Tempest/Console/bin/tempest"
],
"config": {
"allow-plugins": {
"carthage-software/mago": true
}
},
"scripts": {
"phpunit": "vendor/bin/phpunit --display-warnings --display-skipped --display-deprecations --display-errors --display-notices",
"phpunit": "@php -d memory_limit=2G vendor/bin/phpunit --display-warnings --display-skipped --display-deprecations --display-errors --display-notices",
"coverage": "vendor/bin/phpunit --coverage-html build/reports/html --coverage-clover build/reports/clover.xml",
"mago:fmt": "vendor/bin/mago fmt && vendor/bin/mago lint --fix --potentially-unsafe --fmt",
"mago:lint": "vendor/bin/mago lint --minimum-level=note",
Expand Down
2 changes: 1 addition & 1 deletion mago.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
php_version = "8.4.0"

[source]
paths = ["src", "tests"]
paths = ["src", "packages", "tests"]
includes = ["vendor"]
excludes = [
"./vendor/symfony/cache/Traits/ValueWrapper.php",
Expand Down
5 changes: 4 additions & 1 deletion monorepo-builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
use Symplify\MonorepoBuilder\Config\MBConfig;

return static function (MBConfig $mbConfig): void {
$mbConfig->packageDirectories([__DIR__ . '/src/Tempest']);
$mbConfig->packageDirectories([
__DIR__ . '/src/Tempest',
__DIR__ . '/packages',
]);
};
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
],
"scripts": {
"qa": "bun lint:fix && bun run test run && bun run build",
"lint": "eslint packages",
"lint:fix": "eslint --fix packages",
"lint": "eslint packages/vite-plugin-tempest",
"lint:fix": "eslint --fix packages/vite-plugin-tempest",
"build": "bun --filter '*' build",
"dev": "bun --filter '*' build:stub",
"test": "vitest"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading