Initial project structure with Composer
This commit is contained in:
commit
a46ba1dd4e
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/vendor/
|
19
.htaccess
Normal file
19
.htaccess
Normal file
@ -0,0 +1,19 @@
|
||||
Options All -Indexes
|
||||
|
||||
<Files .htaccess>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</Files>
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
# Redirect to the public folder
|
||||
RewriteEngine On
|
||||
# RewriteBase /
|
||||
RewriteRule ^$ public/ [L]
|
||||
RewriteRule (.*) public/$1 [L]
|
||||
|
||||
# Redirect to HTTPS
|
||||
# RewriteEngine On
|
||||
# RewriteCond %{HTTPS} off
|
||||
# RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
|
||||
</IfModule>
|
7
bin/dev-server.sh
Executable file
7
bin/dev-server.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# cd into the correct directory
|
||||
cd "$( dirname "$0" )"/..
|
||||
|
||||
# launch the PHP dev server
|
||||
php -S localhost:8080 -t public public/index.php
|
18
composer.json
Normal file
18
composer.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "bitgoblin/bitgoblin-website",
|
||||
"description": "Bit Goblin main website",
|
||||
"type": "project",
|
||||
"license": "BSD-2-Clause",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Bitgoblin\\BitgoblinWebsite\\": "src/"
|
||||
}
|
||||
},
|
||||
"authors": [
|
||||
{
|
||||
"name": "Gregory Ballantine",
|
||||
"email": "gballantine@bitgoblin.tech"
|
||||
}
|
||||
],
|
||||
"require": {}
|
||||
}
|
0
logs/.gitkeep
Normal file
0
logs/.gitkeep
Normal file
17
phpcs.xml
Normal file
17
phpcs.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0"?>
|
||||
<ruleset name="Slim coding standard">
|
||||
<description>Slim coding standard</description>
|
||||
|
||||
<!-- display progress -->
|
||||
<arg value="p"/>
|
||||
<!-- use colors in output -->
|
||||
<arg name="colors"/>
|
||||
|
||||
<!-- inherit rules from: -->
|
||||
<rule ref="PSR2"/>
|
||||
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
|
||||
|
||||
<!-- Paths to check -->
|
||||
<file>src</file>
|
||||
<file>tests</file>
|
||||
</ruleset>
|
4
phpstan.neon.dist
Normal file
4
phpstan.neon.dist
Normal file
@ -0,0 +1,4 @@
|
||||
parameters:
|
||||
level: 4
|
||||
paths:
|
||||
- src
|
27
phpunit.xml
Normal file
27
phpunit.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/7.1/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
backupStaticAttributes="false"
|
||||
beStrictAboutTestsThatDoNotTestAnything="true"
|
||||
beStrictAboutChangesToGlobalState="true"
|
||||
beStrictAboutOutputDuringTests="true"
|
||||
colors="true"
|
||||
convertErrorsToExceptions="true"
|
||||
convertNoticesToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
processIsolation="false"
|
||||
stopOnFailure="false"
|
||||
bootstrap="tests/bootstrap.php"
|
||||
>
|
||||
<testsuites>
|
||||
<testsuite name="Test Suite">
|
||||
<directory>./tests/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<filter>
|
||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||
<directory suffix=".php">./src/</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
</phpunit>
|
34
public/.htaccess
Normal file
34
public/.htaccess
Normal file
@ -0,0 +1,34 @@
|
||||
Options All -Indexes
|
||||
|
||||
<Files .htaccess>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</Files>
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
|
||||
# Redirect to HTTPS
|
||||
# RewriteEngine On
|
||||
# RewriteCond %{HTTPS} off
|
||||
# RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
|
||||
|
||||
# Some hosts may require you to use the `RewriteBase` directive.
|
||||
# Determine the RewriteBase automatically and set it as environment variable.
|
||||
# If you are using Apache aliases to do mass virtual hosting or installed the
|
||||
# project in a subdirectory, the base path will be prepended to allow proper
|
||||
# resolution of the index.php file and to redirect to the correct URI. It will
|
||||
# work in environments without path prefix as well, providing a safe, one-size
|
||||
# fits all solution. But as you do not need it in this case, you can comment
|
||||
# the following 2 lines to eliminate the overhead.
|
||||
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
|
||||
RewriteRule ^(.*) - [E=BASE:%1]
|
||||
|
||||
# If the above doesn't work you might need to set the `RewriteBase` directive manually, it should be the
|
||||
# absolute physical path to the directory that contains this htaccess file.
|
||||
# RewriteBase /
|
||||
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^ index.php [QSA,L]
|
||||
</IfModule>
|
Loading…
Reference in New Issue
Block a user