sura / framework
System parts
Requires (Dev)
- jetbrains/phpstorm-attributes: 1.0
- php-coveralls/php-coveralls: ^2.1
- phpstan/phpstan: ^1.5
- phpunit/phpunit: ^9.5.20 || ^10.0.0
- squizlabs/php_codesniffer: ^3.6
- dev-main
- 0.3.8
- 0.3.7
- 0.3.6
- 0.3.5
- 0.3.4
- 0.3.3
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.7
- 0.2.6
- 0.2.5
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.13
- 0.1.12
- 0.1.11
- 0.1.10
- 0.1.9
- 0.1.8
- 0.1.7
- 0.1.6
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- 0.0.5
- 0.0.4
- 0.0.3
- 0.0.2
- 0.0.1
- dev-dependabot/composer/phpstan/phpstan-1.10.65
- dev-dependabot/composer/phpunit/phpunit-10.5.15
- dev-dependabot/composer/squizlabs/php_codesniffer-3.9.0
- dev-semyon492-patch-1
- dev-dev
This package is auto-updated.
Last update: 2024-10-25 22:02:27 UTC
README
Installation
Server Requirements
The Sura framework has a few system requirements.
However, if you are not using Homestead, you will need to make sure your server meets the following requirements:
- PHP >= 8.1
- JSON PHP Extension
- ICONV PHP Extension
- GD PHP extension
- MySQLI PHP Extension
Installing Sura
It's recommended that you use Composer to install Sura.
$ composer create-project sura/sura:^0.0.1 MYPROJECT --prefer-dist
The database configuration is located in config/config.php
To create a migration, use the -migrate
$ php craft -migrate
To create a user admin, use the -make:add-user
$ php craft -make:add-user Ivan Petrov petrov@example.com password
Configuration
Public Directory
After installing Sura, you should configure your web server's document / web root to be the public
directory. The index.php
in this directory serves as the front controller for all HTTP requests entering your application.
Configuration Files
All of the configuration files for the Sura framework are stored in the config
directory.
URLs
Apache
Sura includes a public/.htaccess
file that is used to provide URLs without the index.php
front controller in the path. Before serving Sura with Apache, be sure to enable the mod_rewrite
module so the .htaccess
file will be honored by the server.
If the .htaccess
file that ships with Sura does not work with your Apache installation, try this alternative:
Options +FollowSymLinks -Indexes
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
Nginx
If you are using Nginx, the following directive in your site configuration will direct all requests to the index.php
front controller:
location / {
try_files $uri $uri/ /index.php?$query_string;
}
Contributing
Please see CONTRIBUTING for details.
Security
If you discover security related issues, please email semyon492@ya.ru instead of using the issue tracker.
For enterprise
Financial Contributors
Become a financial contributor and help us sustain our community. (semyon492@ya.ru)
License
The Sura Framework is licensed under the MIT license. See License File for more information.