Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/upgrade to cake4 and update home #363

Merged
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
49 changes: 45 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,52 @@
/vendor/*
/config/app.php
/tmp/*
# CakePHP specific files #
##########################
/config/app_local.php
/config/.env
/logs/*
/tmp/*
/vendor/*

# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db
.directory

# Tool specific files #
#######################
# PHPUnit
.phpunit.result.cache
# vim
*~
*.swp
*.swo
# sublime text & textmate
*.sublime-*
*.stTheme.cache
*.tmlanguage.cache
*.tmPreferences.cache
# Eclipse
.settings/*
# JetBrains, aka PHPStorm, IntelliJ IDEA
.idea/*
# NetBeans
nbproject/*
# Visual Studio Code
.vscode
# Sass preprocessor
.sass-cache/

/webroot/cache_css/*
/webroot/cache_js/*
/files/*
/webroot/files/*
/plugins/Showcase
.idea
.php_cs.cache
config/Migrations/schema-dump-default.lock
.ddev
58 changes: 29 additions & 29 deletions bin/cake
Original file line number Diff line number Diff line change
Expand Up @@ -19,40 +19,40 @@

# Canonicalize by following every symlink of the given name recursively
canonicalize() {
NAME="$1"
if [ -f "$NAME" ]
then
DIR=$(dirname -- "$NAME")
NAME=$(cd -P "$DIR" > /dev/null && pwd -P)/$(basename -- "$NAME")
fi
while [ -h "$NAME" ]; do
DIR=$(dirname -- "$NAME")
SYM=$(readlink "$NAME")
NAME=$(cd "$DIR" > /dev/null && cd $(dirname -- "$SYM") > /dev/null && pwd)/$(basename -- "$SYM")
done
echo "$NAME"
NAME="$1"
if [ -f "$NAME" ]
then
DIR=$(dirname -- "$NAME")
NAME=$(cd -P "$DIR" > /dev/null && pwd -P)/$(basename -- "$NAME")
fi
while [ -h "$NAME" ]; do
DIR=$(dirname -- "$NAME")
SYM=$(readlink "$NAME")
NAME=$(cd "$DIR" > /dev/null && cd "$(dirname -- "$SYM")" > /dev/null && pwd)/$(basename -- "$SYM")
done
echo "$NAME"
}

# Find a CLI version of PHP
findCliPhp() {
for TESTEXEC in php php-cli /usr/local/bin/php
do
SAPI=`echo "<?= PHP_SAPI ?>" | $TESTEXEC 2>/dev/null`
if [ "$SAPI" = "cli" ]
then
echo $TESTEXEC
return
fi
done
echo "Failed to find a CLI version of PHP; falling back to system standard php executable" >&2
echo "php";
for TESTEXEC in php php-cli /usr/local/bin/php
do
SAPI=$(echo "<?= PHP_SAPI ?>" | $TESTEXEC 2>/dev/null)
if [ "$SAPI" = "cli" ]
then
echo $TESTEXEC
return
fi
done
echo "Failed to find a CLI version of PHP; falling back to system standard php executable" >&2
echo "php";
}

# If current path is a symlink, resolve to real path
realname="$0"
if [ -L "$realname" ]
then
realname=$(readlink -f "$0")
realname=$(readlink -f "$0")
fi

CONSOLE=$(dirname -- "$(canonicalize "$realname")")
Expand All @@ -62,14 +62,14 @@ APP=$(dirname "$CONSOLE")
# variable with the correct path in it.
if [ -z "$PHP" ]
then
PHP=$(findCliPhp)
PHP=$(findCliPhp)
fi

if [ $(basename $realname) != 'cake' ]
if [ "$(basename "$realname")" != 'cake' ]
then
exec $PHP "$CONSOLE"/cake.php $(basename $realname) "$@"
exec "$PHP" "$CONSOLE"/cake.php "$(basename "$realname")" "$@"
else
exec $PHP "$CONSOLE"/cake.php "$@"
exec "$PHP" "$CONSOLE"/cake.php "$@"
fi

exit
exit
2 changes: 1 addition & 1 deletion bin/cake.bat
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
:: @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
:: @link https://cakephp.org CakePHP(tm) Project
:: @since 2.0.0
:: @license https://www.opensource.org/licenses/mit-license.php MIT License
:: @license https://opensource.org/licenses/mit-license.php MIT License
::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Expand Down
36 changes: 21 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,33 @@
"license": "MIT",
"require": {
"php": ">=7.3",
"cakephp/cakephp": "3.8.*",
"cakephp/migrations": "^2.0.0",
"cakephp/cakephp": "^4.4.0",
"cakephp/migrations": "^3.8.2",
"mobiledetect/mobiledetectlib": "2.*",
"cakephp/plugin-installer": "^1.3",
"markstory/asset_compress": "~3.0",
"cakedc/users": "^8.0",
"burzum/cakephp-imagine-plugin": "~2.0",
"muffin/tags": "^1.1",
"muffin/slug": "^1.4",
"josegonzalez/cakephp-upload": "^4.0.0",
"markstory/asset_compress": "^4.1.0",
"cakedc/users": "^11.2.1",
"burzum/cakephp-imagine-plugin": "^4.0.0",
"muffin/tags": "^2.0.0-beta",
"muffin/slug": "^2.1.1",
"josegonzalez/cakephp-upload": "^7.0.1",
"google/recaptcha": "~1.1",
"league/flysystem": "^1.1",
"league/flysystem": "^2.2",
"linkorb/jsmin-php": "^1.0",
"natxet/cssmin": "^3.0"
"natxet/cssmin": "^3.0",
"cakedc/cakephp-cached-routing": "^1.0"
},
"require-dev": {
"psy/psysh": "@stable",
"cakephp/debug_kit": "~3.2",
"cakephp/bake": "~1.1",
"cakephp/debug_kit": "^4.9.4",
"cakephp/bake": "^2.9.3",
"cakephp/cakephp-codesniffer": "^3.0",
"phpunit/phpunit": "^6.0"
},
"phpunit/phpunit": "^9.5",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "1.7.15",
"psalm/phar": "^4.18.1",
"dereuromark/cakephp-ide-helper": "@stable"
},
"autoload": {
"psr-4": {
"App\\": "src"
Expand All @@ -36,7 +41,8 @@
"config": {
"secure-http": false,
"allow-plugins": {
"cakephp/plugin-installer": true
"cakephp/plugin-installer": true,
"phpstan/extension-installer": true
}
},
"extra": {
Expand Down
Loading