Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace app\controllers;
namespace app\http\controllers;

use mako\http\routing\Controller;
use mako\view\ViewFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use app\controllers\Index;
use app\http\controllers\Index;

/** @var \mako\http\routing\Routes $routes */

Expand Down
2 changes: 1 addition & 1 deletion frameworks/PHP/mako/app/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Configure PHP error reporting.
* @see http://php.net/manual/en/function.error-reporting.php
*/
error_reporting(E_ALL | E_STRICT);
error_reporting(E_ALL);

/*
* Choose if errors that are NOT caught by the Mako error and exception handlers should be
Expand Down
2 changes: 1 addition & 1 deletion frameworks/PHP/mako/app/models/Fortune.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
use mako\database\midgard\ORM;

class Fortune extends ORM {
protected $tableName = 'Fortune';
protected string $tableName = 'Fortune';
}
2 changes: 1 addition & 1 deletion frameworks/PHP/mako/app/models/World.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
use mako\database\midgard\ORM;

class World extends ORM {
protected $tableName = 'World';
protected string $tableName = 'World';
}
2 changes: 1 addition & 1 deletion frameworks/PHP/mako/composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"require": {
"php": ">=7.4.0",
"mako/framework": "^9.0"
"mako/framework": "^11.0"
},
"autoload": {
"psr-4": {
Expand Down
10 changes: 5 additions & 5 deletions frameworks/PHP/mako/mako.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:22.04
FROM ubuntu:24.04

ARG DEBIAN_FRONTEND=noninteractive

Expand All @@ -7,22 +7,22 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \
apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null

RUN apt-get install -yqq nginx git unzip \
php8.3-cli php8.3-fpm php8.3-mysql php8.3-mbstring php8.3-xml php8.3-curl > /dev/null
php8.5-cli php8.5-fpm php8.5-mysql php8.5-mbstring php8.5-xml php8.5-curl > /dev/null

COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer

COPY deploy/conf/* /etc/php/8.3/fpm/
COPY deploy/conf/* /etc/php/8.5/fpm/

ADD ./ /mako
WORKDIR /mako

RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi;
RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.5/fpm/php-fpm.conf ; fi;

RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --ignore-platform-reqs --quiet

RUN chmod -R 777 app

EXPOSE 8080

CMD service php8.3-fpm start && \
CMD service php8.5-fpm start && \
nginx -c /mako/deploy/nginx.conf
3 changes: 2 additions & 1 deletion frameworks/PHP/mako/public/index.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

use mako\application\CurrentApplication;
use mako\application\web\Application;

/**
Expand All @@ -10,4 +11,4 @@
/*
* Start and run the application.
*/
Application::start(MAKO_APPLICATION_PATH)->run();
CurrentApplication::set(new Application(MAKO_APPLICATION_PATH))->run();
Loading