Skip to content
This repository was archived by the owner on Jul 14, 2025. It is now read-only.
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
release:
types: [released]

permissions: {}

jobs:
update:
permissions:
contents: write
uses: laravel/.github/.github/workflows/update-changelog.yml@main
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Release Notes

## [Unreleased](https://github.com/laravel/sail/compare/v1.41.0...1.x)
## [Unreleased](https://github.com/laravel/sail/compare/v1.41.1...1.x)

## [v1.41.1](https://github.com/laravel/sail/compare/v1.41.0...v1.41.1) - 2025-04-22

* Update logo and socialcard by [@iamdavidhill](https://github.com/iamdavidhill) in https://github.com/laravel/sail/pull/781
* Fix `DB_DATABASE` replacement in `phpunit.xml` by [@choowx](https://github.com/choowx) in https://github.com/laravel/sail/pull/783
* Added configurable user for shell commands by [@fkrzski](https://github.com/fkrzski) in https://github.com/laravel/sail/pull/785
* fix: typesense healthcheck by [@Barbapapazes](https://github.com/Barbapapazes) in https://github.com/laravel/sail/pull/788

## [v1.41.0](https://github.com/laravel/sail/compare/v1.40.0...v1.41.0) - 2025-01-24

Expand Down
28 changes: 16 additions & 12 deletions art/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified art/socialcard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 24 additions & 23 deletions bin/sail
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ fi
# Define environment variables...
export APP_PORT=${APP_PORT:-80}
export APP_SERVICE=${APP_SERVICE:-"laravel.test"}
export APP_USER=${APP_USER:-"sail"}
export DB_PORT=${DB_PORT:-3306}
export WWWUSER=${WWWUSER:-$UID}
export WWWGROUP=${WWWGROUP:-$(id -g)}
Expand Down Expand Up @@ -213,7 +214,7 @@ if [ "$1" == "php" ]; then
shift 1

if [ "$EXEC" == "yes" ]; then
ARGS+=(exec -u sail)
ARGS+=(exec -u "$APP_USER")
[ ! -t 0 ] && ARGS+=(-T)
ARGS+=("$APP_SERVICE" "php")
else
Expand All @@ -227,7 +228,7 @@ elif [ "$1" == "bin" ]; then
if [ "$EXEC" == "yes" ]; then
CMD=$1
shift 1
ARGS+=(exec -u sail)
ARGS+=(exec -u "$APP_USER")
[ ! -t 0 ] && ARGS+=(-T)
ARGS+=("$APP_SERVICE" ./vendor/bin/"$CMD")
else
Expand All @@ -241,7 +242,7 @@ elif [ "$1" == "run" ]; then
if [ "$EXEC" == "yes" ]; then
CMD=$1
shift 1
ARGS+=(exec -u sail)
ARGS+=(exec -u "$APP_USER")
[ ! -t 0 ] && ARGS+=(-T)
ARGS+=("$APP_SERVICE" "$CMD")
else
Expand All @@ -253,7 +254,7 @@ elif [ "$1" == "docker-compose" ]; then
shift 1

if [ "$EXEC" == "yes" ]; then
ARGS+=(exec -u sail)
ARGS+=(exec -u "$APP_USER")
[ ! -t 0 ] && ARGS+=(-T)
ARGS+=("$APP_SERVICE" "${DOCKER_COMPOSE[@]}")
else
Expand All @@ -265,7 +266,7 @@ elif [ "$1" == "composer" ]; then
shift 1

if [ "$EXEC" == "yes" ]; then
ARGS+=(exec -u sail)
ARGS+=(exec -u "$APP_USER")
[ ! -t 0 ] && ARGS+=(-T)
ARGS+=("$APP_SERVICE" "composer")
else
Expand All @@ -277,7 +278,7 @@ elif [ "$1" == "artisan" ] || [ "$1" == "art" ] || [ "$1" == "a" ]; then
shift 1

if [ "$EXEC" == "yes" ]; then
ARGS+=(exec -u sail)
ARGS+=(exec -u "$APP_USER")
[ ! -t 0 ] && ARGS+=(-T)
ARGS+=("$APP_SERVICE" php artisan)
else
Expand All @@ -289,7 +290,7 @@ elif [ "$1" == "debug" ]; then
shift 1

if [ "$EXEC" == "yes" ]; then
ARGS+=(exec -u sail -e XDEBUG_TRIGGER=1)
ARGS+=(exec -u "$APP_USER" -e XDEBUG_TRIGGER=1)
[ ! -t 0 ] && ARGS+=(-T)
ARGS+=("$APP_SERVICE" php artisan)
else
Expand All @@ -301,7 +302,7 @@ elif [ "$1" == "test" ]; then
shift 1

if [ "$EXEC" == "yes" ]; then
ARGS+=(exec -u sail)
ARGS+=(exec -u "$APP_USER")
[ ! -t 0 ] && ARGS+=(-T)
ARGS+=("$APP_SERVICE" php artisan test)
else
Expand All @@ -313,7 +314,7 @@ elif [ "$1" == "phpunit" ]; then
shift 1

if [ "$EXEC" == "yes" ]; then
ARGS+=(exec -u sail)
ARGS+=(exec -u "$APP_USER")
[ ! -t 0 ] && ARGS+=(-T)
ARGS+=("$APP_SERVICE" php vendor/bin/phpunit)
else
Expand All @@ -325,7 +326,7 @@ elif [ "$1" == "pest" ]; then
shift 1

if [ "$EXEC" == "yes" ]; then
ARGS+=(exec -u sail)
ARGS+=(exec -u "$APP_USER")
[ ! -t 0 ] && ARGS+=(-T)
ARGS+=("$APP_SERVICE" php vendor/bin/pest)
else
Expand All @@ -337,7 +338,7 @@ elif [ "$1" == "pint" ]; then
shift 1

if [ "$EXEC" == "yes" ]; then
ARGS+=(exec -u sail)
ARGS+=(exec -u "$APP_USER")
[ ! -t 0 ] && ARGS+=(-T)
ARGS+=("$APP_SERVICE" php vendor/bin/pint)
else
Expand All @@ -349,7 +350,7 @@ elif [ "$1" == "dusk" ]; then
shift 1

if [ "$EXEC" == "yes" ]; then
ARGS+=(exec -u sail)
ARGS+=(exec -u "$APP_USER")
[ ! -t 0 ] && ARGS+=(-T)
ARGS+=(-e "APP_URL=http://${APP_SERVICE}")
ARGS+=(-e "DUSK_DRIVER_URL=http://selenium:4444/wd/hub")
Expand All @@ -363,7 +364,7 @@ elif [ "$1" == "dusk:fails" ]; then
shift 1

if [ "$EXEC" == "yes" ]; then
ARGS+=(exec -u sail)
ARGS+=(exec -u "$APP_USER")
[ ! -t 0 ] && ARGS+=(-T)
ARGS+=(-e "APP_URL=http://${APP_SERVICE}")
ARGS+=(-e "DUSK_DRIVER_URL=http://selenium:4444/wd/hub")
Expand All @@ -377,7 +378,7 @@ elif [ "$1" == "tinker" ]; then
shift 1

if [ "$EXEC" == "yes" ]; then
ARGS+=(exec -u sail)
ARGS+=(exec -u "$APP_USER")
[ ! -t 0 ] && ARGS+=(-T)
ARGS+=("$APP_SERVICE" php artisan tinker)
else
Expand All @@ -389,7 +390,7 @@ elif [ "$1" == "node" ]; then
shift 1

if [ "$EXEC" == "yes" ]; then
ARGS+=(exec -u sail)
ARGS+=(exec -u "$APP_USER")
[ ! -t 0 ] && ARGS+=(-T)
ARGS+=("$APP_SERVICE" node)
else
Expand All @@ -401,7 +402,7 @@ elif [ "$1" == "npm" ]; then
shift 1

if [ "$EXEC" == "yes" ]; then
ARGS+=(exec -u sail)
ARGS+=(exec -u "$APP_USER")
[ ! -t 0 ] && ARGS+=(-T)
ARGS+=("$APP_SERVICE" npm)
else
Expand All @@ -413,7 +414,7 @@ elif [ "$1" == "npx" ]; then
shift 1

if [ "$EXEC" == "yes" ]; then
ARGS+=(exec -u sail)
ARGS+=(exec -u "$APP_USER")
[ ! -t 0 ] && ARGS+=(-T)
ARGS+=("$APP_SERVICE" npx)
else
Expand All @@ -425,7 +426,7 @@ elif [ "$1" == "pnpm" ]; then
shift 1

if [ "$EXEC" == "yes" ]; then
ARGS+=(exec -u sail)
ARGS+=(exec -u "$APP_USER")
[ ! -t 0 ] && ARGS+=(-T)
ARGS+=("$APP_SERVICE" pnpm)
else
Expand All @@ -437,7 +438,7 @@ elif [ "$1" == "pnpx" ]; then
shift 1

if [ "$EXEC" == "yes" ]; then
ARGS+=(exec -u sail)
ARGS+=(exec -u "$APP_USER")
[ ! -t 0 ] && ARGS+=(-T)
ARGS+=("$APP_SERVICE" pnpx)
else
Expand All @@ -449,7 +450,7 @@ elif [ "$1" == "yarn" ]; then
shift 1

if [ "$EXEC" == "yes" ]; then
ARGS+=(exec -u sail)
ARGS+=(exec -u "$APP_USER")
[ ! -t 0 ] && ARGS+=(-T)
ARGS+=("$APP_SERVICE" yarn)
else
Expand All @@ -461,7 +462,7 @@ elif [ "$1" == "bun" ]; then
shift 1

if [ "$EXEC" == "yes" ]; then
ARGS+=(exec -u sail)
ARGS+=(exec -u "$APP_USER")
[ ! -t 0 ] && ARGS+=(-T)
ARGS+=("$APP_SERVICE" bun)
else
Expand All @@ -473,7 +474,7 @@ elif [ "$1" == "bunx" ]; then
shift 1

if [ "$EXEC" == "yes" ]; then
ARGS+=(exec -u sail)
ARGS+=(exec -u "$APP_USER")
[ ! -t 0 ] && ARGS+=(-T)
ARGS+=("$APP_SERVICE" bunx)
else
Expand Down Expand Up @@ -524,7 +525,7 @@ elif [ "$1" == "shell" ] || [ "$1" == "bash" ]; then
shift 1

if [ "$EXEC" == "yes" ]; then
ARGS+=(exec -u sail)
ARGS+=(exec -u "$APP_USER")
[ ! -t 0 ] && ARGS+=(-T)
ARGS+=("$APP_SERVICE" bash)
else
Expand Down
9 changes: 8 additions & 1 deletion src/Console/Concerns/InteractsWithDockerComposeServices.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,14 @@ protected function configurePhpUnit()
$phpunit = file_get_contents($path);

$phpunit = preg_replace('/^.*DB_CONNECTION.*\n/m', '', $phpunit);
$phpunit = str_replace('<!-- <env name="DB_DATABASE" value=":memory:"/> -->', '<env name="DB_DATABASE" value="testing"/>', $phpunit);
$phpunit = str_replace(
[
'<!-- <env name="DB_DATABASE" value=":memory:"/> -->',
'<env name="DB_DATABASE" value=":memory:"/>',
],
'<env name="DB_DATABASE" value="testing"/>',
$phpunit
);

file_put_contents($this->laravel->basePath('phpunit.xml'), $phpunit);
}
Expand Down
Loading