diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index b277dca..c0cafa6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,13 @@ FROM php:8.3-apache -# Enable mod_rewrite for clean URLs RUN a2enmod rewrite -# Install PHP extensions RUN docker-php-ext-install pdo_mysql -# Copy Apache vhost config COPY docker/apache.conf /etc/apache2/sites-available/000-default.conf -# Copy all project files into the container COPY . /var/www/html -# Fix permissions RUN chown -R www-data:www-data /var/www/html WORKDIR /var/www/html \ No newline at end of file diff --git a/compose.yaml b/compose.yaml index da63586..7fa99d9 100644 --- a/compose.yaml +++ b/compose.yaml @@ -5,7 +5,7 @@ services: ports: - "8080:80" volumes: - - ".:/var/www/html" # whole project, not just src/ + - ".:/var/www/html" environment: - DB_HOST=${DB_HOST} - DB_NAME=${DB_NAME} diff --git a/src/View.php b/src/View.php index 89232bb..e86242c 100644 --- a/src/View.php +++ b/src/View.php @@ -2,8 +2,6 @@ namespace src; -use http\Exception\RuntimeException; - class View { diff --git a/src/ViewModels/HomeData.php b/src/ViewModels/HomeData.php index b39f19a..257f63d 100644 --- a/src/ViewModels/HomeData.php +++ b/src/ViewModels/HomeData.php @@ -6,6 +6,6 @@ class HomeData { public function __construct( public string $pageTitle, - public array $posts // Or even better: public array|PostDTO[] $posts + public array $posts ) {} } \ No newline at end of file