Skip to content

Commit

Permalink
Merge pull request #7 from spiral-packages/hotfix/sf3-support
Browse files Browse the repository at this point in the history
Adds Spiral Framework 3.0 support
  • Loading branch information
butschster authored Sep 16, 2022
2 parents 501ddfc + 247831a commit f5b9720
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 220 deletions.
12 changes: 0 additions & 12 deletions .github/dependabot.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
on:
push:
branches:
- master

name: static analysis

jobs:
psalm:
uses: spiral/gh-actions/.github/workflows/psalm.yml@master
with:
os: >-
['ubuntu-latest']
php: >-
['8.1']
53 changes: 0 additions & 53 deletions .github/workflows/run-tests.yml

This file was deleted.

51 changes: 0 additions & 51 deletions .github/workflows/static-analysis.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/update-changelog.yml

This file was deleted.

19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
Simple PHP web server for Spiral Framework
# Simple PHP web server for Spiral Framework

[![PHP](https://img.shields.io/packagist/php-v/spiral-packages/simple-php-server.svg?style=flat-square)](https://packagist.org/packages/spiral-packages/simple-php-server)
[![Latest Version on Packagist](https://img.shields.io/packagist/v/spiral-packages/simple-php-server.svg?style=flat-square)](https://packagist.org/packages/spiral-packages/simple-php-server)
[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/spiral-packages/simple-php-server/run-tests?label=tests&style=flat-square)](https://github.com/spiral-packages/simple-php-server/actions?query=workflow%3Arun-tests+branch%3Amain)
[![Total Downloads](https://img.shields.io/packagist/dt/spiral-packages/simple-php-server.svg?style=flat-square)](https://packagist.org/packages/spiral-packages/simple-php-server)
[![PHP Version Require](https://poser.pugx.org/spiral-packages/simple-php-server/require/php)](https://packagist.org/packages/spiral-packages/simple-php-server)
[![Latest Stable Version](https://poser.pugx.org/spiral-packages/simple-php-server/v/stable)](https://packagist.org/packages/spiral-packages/simple-php-server)
[![psalm](https://github.com/spiral-packages/simple-php-server/actions/workflows/psalm.yml/badge.svg)](https://github.com/spiral-packages/simple-php-server/actions)
[![Codecov](https://codecov.io/gh/spiral-packages/simple-php-server/branch/master/graph/badge.svg)](https://codecov.io/gh/spiral-packages/simple-php-server/)
[![Total Downloads](https://poser.pugx.org/spiral-packages/simple-php-server/downloads)](https://packagist.org/spiral-packages/simple-php-server/phpunit)

The package helps running applications on the PHP development server. As a developer, you can use the package to develop and test various functions within the application. It also accepts two additional options. You can use the host for changing application’s address and port.
The package helps running applications on the PHP development server. As a developer, you can use the package to develop
and test various functions within the application. It also accepts two additional options. You can use the host for
changing application’s address and port.

## Requirements

Make sure that your server is configured with following PHP version and extensions:

- PHP 8.0+
- Spiral framework 2.9+

## Installation

You can install the package via composer:
Expand All @@ -31,7 +34,7 @@ protected const LOAD = [
];
```

> Note: if you are using [`spiral-packages/discoverer`](https://github.com/spiral-packages/discoverer),
> Note: if you are using [`spiral-packages/discoverer`](https://github.com/spiral-packages/discoverer),
> you don't need to register bootloader by yourself.
## Starting a server
Expand Down
16 changes: 3 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,21 @@
}
],
"require": {
"php": "^8.0",
"spiral/boot": "^2.9",
"spiral/console": "^2.9",
"php": "^8.1",
"spiral/boot": "^3.0",
"spiral/console": "^3.0",
"symfony/http-foundation": "^6.0",
"symfony/process": "^6.0"
},
"require-dev": {
"mockery/mockery": "^1.5",
"phpunit/phpunit": "^9.5",
"spiral/testing": "^1.0",
"vimeo/psalm": "^4.9"
},
"autoload": {
"psr-4": {
"Spiral\\SimpleServer\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Spiral\\SimpleServer\\Tests\\App\\": "tests/app",
"Spiral\\SimpleServer\\Tests\\": "tests/src"
}
},
"scripts": {
"test": "vendor/bin/phpunit",
"psalm": "vendor/bin/psalm --config=psalm.xml ./src"
},
"config": {
Expand Down
23 changes: 1 addition & 22 deletions src/Bootloader/SimpleServerBootloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
namespace Spiral\SimpleServer\Bootloader;

use Spiral\Boot\Bootloader\Bootloader;
use Spiral\Core\Container;
use Spiral\Config\ConfiguratorInterface;
use Spiral\SimpleServer\Commands;
use Spiral\SimpleServer\Config\SimpleServerConfig;
use Spiral\Console\Bootloader\ConsoleBootloader;

class SimpleServerBootloader extends Bootloader
Expand All @@ -19,26 +16,8 @@ class SimpleServerBootloader extends Bootloader
ConsoleBootloader::class
];

public function __construct(private ConfiguratorInterface $config)
public function init(ConsoleBootloader $console): void
{
}

public function boot(ConsoleBootloader $console): void
{
//$this->initConfig();

$console->addCommand(Commands\ServeCommand::class);
}

public function start(Container $container): void
{
}

private function initConfig(): void
{
$this->config->setDefaults(
SimpleServerConfig::CONFIG,
[]
);
}
}
13 changes: 0 additions & 13 deletions src/Config/SimpleServerConfig.php

This file was deleted.

Empty file removed tests/app/.gitkeep
Empty file.
20 changes: 0 additions & 20 deletions tests/src/TestCase.php

This file was deleted.

0 comments on commit f5b9720

Please sign in to comment.