Check for calendar extension in installer

This commit is contained in:
Nabeel Shahzad
2019-06-19 13:02:06 -04:00
parent 4653eb20ad
commit fb9c1c3681
6 changed files with 12 additions and 5 deletions

View File

@@ -92,7 +92,6 @@ if [ "$TRAVIS" = "true" ]; then
find storage/app/public -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
find storage/debugbar -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
find storage/docker -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
find storage/docker/data -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
find storage/framework/cache -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
find storage/framework/sessions -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
find storage/framework/views -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +

View File

@@ -13,7 +13,7 @@ class Dates
*
* @return array
*/
public static function getMonthsList(Carbon $start_date)
public static function getMonthsList(Carbon $start_date): array
{
$months = [];
$now = date('Y-m');
@@ -35,10 +35,10 @@ class Dates
*
* @return array
*/
public static function getMonthBoundary($month)
public static function getMonthBoundary($month): array
{
[$year, $month] = explode('-', $month);
$days = cal_days_in_month(CAL_GREGORIAN, $month, $year);
$days = \cal_days_in_month(CAL_GREGORIAN, $month, $year);
return [
"$year-$month-01",

View File

@@ -34,12 +34,18 @@ services:
MYSQL_ROOT_PASSWORD:
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
volumes:
- ./storage/docker/data/mysql:/var/lib/mysql
- ./storage/docker/mysql:/var/lib/mysql
ports:
- 3306:3306
redis:
image: redis:5.0.4-alpine
command: ["redis-server", "--appendonly", "yes"]
volumes:
- ./storage/docker/redis:/data
ports:
- 6379:6379
restart: always
# Use this to tail the logs so it's just all in a single window
logs:

View File

@@ -6,6 +6,7 @@ return [
],
'extensions' => [
'calendar',
'openssl',
'pdo',
'mbstring',

View File

@@ -10,6 +10,7 @@ COPY ext-opcache.ini $PHP_INI_DIR/conf.d/
RUN ln -sf /dev/stderr /var/log/fpm-error.log
RUN docker-php-ext-install \
calendar \
pdo_mysql \
gmp \
opcache