Compare commits
419 Commits
7.0.0-beta
...
patch-2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db34d0e3e7 | ||
|
|
fffbab7201 | ||
|
|
b9e7a2efc9 | ||
|
|
76a2a16fa6 | ||
|
|
73f88fce0c | ||
|
|
cfbd1c901a | ||
|
|
e70ee5aa6f | ||
|
|
617813bdbf | ||
|
|
f1c54bcc7c | ||
|
|
d94d754961 | ||
|
|
9abfbd6c8c | ||
|
|
97fc1dd43d | ||
|
|
edc37f40fa | ||
|
|
950c7788be | ||
|
|
b3af50ac5a | ||
|
|
8a9b68d9ec | ||
|
|
70a4cf9f90 | ||
|
|
c3465851b2 | ||
|
|
b13c4df338 | ||
|
|
c736a9b639 | ||
|
|
d2e1004e08 | ||
|
|
3800c01d94 | ||
|
|
922e754c9e | ||
|
|
936cd2efd3 | ||
|
|
e22d6d5996 | ||
|
|
efcb7e8895 | ||
|
|
43fbe9e943 | ||
|
|
8fc0aec800 | ||
|
|
bb84fa82a4 | ||
|
|
4fe323a763 | ||
|
|
e3b4a0ed2e | ||
|
|
a4c431d39f | ||
|
|
a52e0410a7 | ||
|
|
baf63361a0 | ||
|
|
b4d5c0fbcd | ||
|
|
6b7eab05e2 | ||
|
|
4c8e31ac6f | ||
|
|
fe41e61c02 | ||
|
|
bd85a04530 | ||
|
|
cbb7d6e274 | ||
|
|
8907527872 | ||
|
|
942c060c99 | ||
|
|
68a9421445 | ||
|
|
4e652c91ae | ||
|
|
a6f62045c4 | ||
|
|
3f3b63da6f | ||
|
|
dd7812e5c5 | ||
|
|
447d02bd4f | ||
|
|
be9b698f14 | ||
|
|
d110c2d951 | ||
|
|
4d20998368 | ||
|
|
4a20b41b25 | ||
|
|
8c2513eb3d | ||
|
|
2dbd58e59e | ||
|
|
bf77f7dd96 | ||
|
|
5a570989de | ||
|
|
6b3207377a | ||
|
|
ac1d5e1555 | ||
|
|
0d45fc287b | ||
|
|
4911f6799d | ||
|
|
5821067231 | ||
|
|
fc7ad7eb6a | ||
|
|
101b3261f5 | ||
|
|
fb0027b140 | ||
|
|
066702e490 | ||
|
|
b4e0515405 | ||
|
|
f5ca8ce6e3 | ||
|
|
7e9196c7e6 | ||
|
|
a2916bf536 | ||
|
|
0578f98b58 | ||
|
|
2e0f0b00ef | ||
|
|
d5d9010134 | ||
|
|
bd8e13e78f | ||
|
|
c4dee07b7f | ||
|
|
f8a44d8c6d | ||
|
|
617cea5df7 | ||
|
|
3a99fe9e0e | ||
|
|
a952071cb4 | ||
|
|
157e0d830c | ||
|
|
a5b83185f5 | ||
|
|
29ff0758a7 | ||
|
|
be74d99ae8 | ||
|
|
53de2e3229 | ||
|
|
80a90c6e3c | ||
|
|
854ed9b92c | ||
|
|
46b17b5c04 | ||
|
|
0068b1215a | ||
|
|
984c1e0cec | ||
|
|
ad8b8e8945 | ||
|
|
2b0056b7c5 | ||
|
|
319a9fc8e1 | ||
|
|
a037597a21 | ||
|
|
4026fe9149 | ||
|
|
18e1d63760 | ||
|
|
4bda494c6b | ||
|
|
a5513b6fbb | ||
|
|
e4972eaae3 | ||
|
|
e95e61d4b4 | ||
|
|
f92912dff4 | ||
|
|
f62c607138 | ||
|
|
d1a3155653 | ||
|
|
883e8786e0 | ||
|
|
fb44b73f44 | ||
|
|
7379e93c46 | ||
|
|
d4bb5605de | ||
|
|
8ecc096bf7 | ||
|
|
6b5cf38224 | ||
|
|
2ecf366670 | ||
|
|
a7981c0a87 | ||
|
|
9cf07c47c7 | ||
|
|
8f4219bc95 | ||
|
|
eae345efa7 | ||
|
|
be15426b5b | ||
|
|
7e4c652330 | ||
|
|
ced2c150b7 | ||
|
|
a2de532f72 | ||
|
|
a52d844719 | ||
|
|
fd814bc79e | ||
|
|
0fa00206ce | ||
|
|
a58237b04b | ||
|
|
dc7efc981c | ||
|
|
060bebf8fe | ||
|
|
aaaf2e7c00 | ||
|
|
1be68d1e63 | ||
|
|
b83f7dcac8 | ||
|
|
c5de2fd8b1 | ||
|
|
b85d0e6a3e | ||
|
|
b37bd2cd7b | ||
|
|
584d37f230 | ||
|
|
1c9d1c1733 | ||
|
|
cd18442207 | ||
|
|
716ba38b6d | ||
|
|
c0514b381b | ||
|
|
5803487d51 | ||
|
|
ca220f1cdf | ||
|
|
75a0a4c87a | ||
|
|
3b6800077f | ||
|
|
bf878a98a4 | ||
|
|
d001704880 | ||
|
|
5371989921 | ||
|
|
6c553569bf | ||
|
|
9eb7dd6913 | ||
|
|
dc007f6d9e | ||
|
|
193fbd369d | ||
|
|
151f188886 | ||
|
|
69d89511be | ||
|
|
48087fb05f | ||
|
|
c702b01a87 | ||
|
|
0a5194b92e | ||
|
|
24aca506fc | ||
|
|
365e33f5f8 | ||
|
|
7a75e0f5ad | ||
|
|
93da2ca061 | ||
|
|
5363e4aa0f | ||
|
|
95a40d3565 | ||
|
|
98aa362935 | ||
|
|
b6603bd178 | ||
|
|
2c539d349d | ||
|
|
5df28eb027 | ||
|
|
0dbf8b8652 | ||
|
|
5856f88a0c | ||
|
|
5f9b9399e9 | ||
|
|
77fe6679ce | ||
|
|
435fa32663 | ||
|
|
78ca06e9dc | ||
|
|
2dd3dd5814 | ||
|
|
ac7a5a65e5 | ||
|
|
c5ab0978db | ||
|
|
8398d94c0a | ||
|
|
1db3295213 | ||
|
|
5dcbd01c00 | ||
|
|
c6d12802a4 | ||
|
|
07de33605b | ||
|
|
ec9ef9c1c2 | ||
|
|
23962a1abb | ||
|
|
9a735d2935 | ||
|
|
51004b143c | ||
|
|
50a0b89caa | ||
|
|
e99c22b007 | ||
|
|
55fa01478d | ||
|
|
552196ce57 | ||
|
|
7aa089bd88 | ||
|
|
1e4b0d629a | ||
|
|
febfff5f12 | ||
|
|
cdf7b13b5b | ||
|
|
51186bed7c | ||
|
|
ac1dc49377 | ||
|
|
be72571185 | ||
|
|
d3e6d2c49a | ||
|
|
4fa58cec5a | ||
|
|
27316f96e8 | ||
|
|
e5ed66b372 | ||
|
|
ee6982f558 | ||
|
|
4f46e75515 | ||
|
|
3ac03d9716 | ||
|
|
ace7c42557 | ||
|
|
3ebf4f2924 | ||
|
|
3739cc8e91 | ||
|
|
bbb5f1d13c | ||
|
|
64e4c91e7e | ||
|
|
3e2b1fe42b | ||
|
|
420bd7e4ae | ||
|
|
e4b1c238f3 | ||
|
|
57e91027c8 | ||
|
|
475ad3a66d | ||
|
|
340f52112d | ||
|
|
c6482bd160 | ||
|
|
df15053b75 | ||
|
|
04b8be1649 | ||
|
|
3d211535f7 | ||
|
|
c1408cb8fe | ||
|
|
519ae600d5 | ||
|
|
82bae9cc74 | ||
|
|
3a07e34259 | ||
|
|
89ca0b49a2 | ||
|
|
5b16c88bcb | ||
|
|
c67e45e98e | ||
|
|
688be6f75a | ||
|
|
8527b39fe2 | ||
|
|
a443908bed | ||
|
|
c46fc9171c | ||
|
|
71c09aaeb1 | ||
|
|
5046d26032 | ||
|
|
4cd7eef937 | ||
|
|
f17cd15b01 | ||
|
|
5f8053226e | ||
|
|
09cd7adb6b | ||
|
|
fb7d988032 | ||
|
|
eb90d08761 | ||
|
|
1ebb181c36 | ||
|
|
975ee9b88e | ||
|
|
52379c3789 | ||
|
|
bcf7acf957 | ||
|
|
3b1936e110 | ||
|
|
b9aeda1cba | ||
|
|
00505a1607 | ||
|
|
6ebbe0209e | ||
|
|
5754103a17 | ||
|
|
6078163d75 | ||
|
|
885e1d599e | ||
|
|
876457af71 | ||
|
|
8c75bd098e | ||
|
|
585c9578e8 | ||
|
|
78ee1a9769 | ||
|
|
7cd01a24d6 | ||
|
|
d5ea0952f5 | ||
|
|
1054d53826 | ||
|
|
69fb5a537e | ||
|
|
5b771be653 | ||
|
|
9135337186 | ||
|
|
95608dbb79 | ||
|
|
a8fb8e93c8 | ||
|
|
2ea18ae1c6 | ||
|
|
99f4f3b3d8 | ||
|
|
03cfc648b0 | ||
|
|
866d95c945 | ||
|
|
b21201c122 | ||
|
|
209b2790b6 | ||
|
|
90a0a8cfee | ||
|
|
8e97a7cc5c | ||
|
|
b1bdd40da7 | ||
|
|
40a94cb9ad | ||
|
|
3c0cd34071 | ||
|
|
261984ee90 | ||
|
|
e8037c7d69 | ||
|
|
6f05dd6c86 | ||
|
|
072d5f76bb | ||
|
|
d1d243ef06 | ||
|
|
819d3bcb47 | ||
|
|
60f378f584 | ||
|
|
6978fbf2e0 | ||
|
|
11b1c2b763 | ||
|
|
655ac66b52 | ||
|
|
e9b30fbe30 | ||
|
|
82b873c071 | ||
|
|
3e7d5f6195 | ||
|
|
ba0ae05c2a | ||
|
|
45873431e4 | ||
|
|
4a3ec38919 | ||
|
|
f3fe3a56ba | ||
|
|
88e8ea6ed1 | ||
|
|
cce575c1a6 | ||
|
|
eafea01e22 | ||
|
|
62cea3eb0c | ||
|
|
3f7a7d0f2e | ||
|
|
877d5a5479 | ||
|
|
9e5386264f | ||
|
|
04b9e37e1d | ||
|
|
8998dabb3d | ||
|
|
e458a761d3 | ||
|
|
3443f6b31e | ||
|
|
2a03d53b3f | ||
|
|
412919fe21 | ||
|
|
80b20a8b25 | ||
|
|
2c238763cb | ||
|
|
2846a78d2a | ||
|
|
632c5782de | ||
|
|
9f3ddd5dbd | ||
|
|
16c977c769 | ||
|
|
9ed2e3f9f4 | ||
|
|
174b602d7c | ||
|
|
b1e745844a | ||
|
|
89481b5fa1 | ||
|
|
dcf9f48364 | ||
|
|
f1902a5faa | ||
|
|
3cd6c8ee82 | ||
|
|
83a0007b7d | ||
|
|
b78c1b935e | ||
|
|
fa89416e5b | ||
|
|
4a14e83c88 | ||
|
|
21e2e48a6e | ||
|
|
a040e288de | ||
|
|
f78d065858 | ||
|
|
660c5303cb | ||
|
|
ea9ee985e8 | ||
|
|
b0f122a301 | ||
|
|
2f40f4737c | ||
|
|
7e742518bc | ||
|
|
dbaac04eea | ||
|
|
f2b216c404 | ||
|
|
14aacdfb75 | ||
|
|
07a75de0bf | ||
|
|
30786b7b27 | ||
|
|
11bbcd1df7 | ||
|
|
342fe31ceb | ||
|
|
c6f46ee4cb | ||
|
|
574768262d | ||
|
|
24e2576645 | ||
|
|
dfbaa1afd3 | ||
|
|
a1d6fa17ad | ||
|
|
b34dc4868e | ||
|
|
0e13905098 | ||
|
|
b9fe8bf738 | ||
|
|
9ed07da9c3 | ||
|
|
6e87f7804c | ||
|
|
cc23c32db7 | ||
|
|
0297ec3746 | ||
|
|
da575932a7 | ||
|
|
c0fbc7d491 | ||
|
|
0060f794ae | ||
|
|
9304daea7a | ||
|
|
8300a69ad5 | ||
|
|
2d36376e29 | ||
|
|
77f2138a1c | ||
|
|
b9993b9c23 | ||
|
|
f16af4d9b1 | ||
|
|
f392bf1cb8 | ||
|
|
39159e2c2e | ||
|
|
018f6b62f6 | ||
|
|
4229366585 | ||
|
|
9fa395a061 | ||
|
|
8b417ce1a8 | ||
|
|
1d53497424 | ||
|
|
07917f4ed2 | ||
|
|
b36a3009dd | ||
|
|
be6c164f03 | ||
|
|
99118daad9 | ||
|
|
3fcd378f91 | ||
|
|
6c0d0e08e3 | ||
|
|
d234a0beb2 | ||
|
|
7a0e5f0ef4 | ||
|
|
2e1bcc1d7a | ||
|
|
6b79ad7e58 | ||
|
|
90e1b3317d | ||
|
|
989e86ecd3 | ||
|
|
dd9fbdb6f1 | ||
|
|
94cfbd4748 | ||
|
|
5e4a003a92 | ||
|
|
893e28eb3a | ||
|
|
8cde3c93b0 | ||
|
|
59d09c0cec | ||
|
|
06b47d97e0 | ||
|
|
03184db2fe | ||
|
|
45b8d737e4 | ||
|
|
51b50972c8 | ||
|
|
3c1b433c29 | ||
|
|
f0719d4d8d | ||
|
|
f5bc087f38 | ||
|
|
02b16d5e57 | ||
|
|
63b574181a | ||
|
|
ff913e5304 | ||
|
|
e431f75ad4 | ||
|
|
819ebece6d | ||
|
|
df832088d5 | ||
|
|
2415caab54 | ||
|
|
d03a77bd4b | ||
|
|
6fcbd603ba | ||
|
|
c2f7c5e421 | ||
|
|
fa01c61677 | ||
|
|
b7b0ac0a73 | ||
|
|
bf24ffb1ba | ||
|
|
831b72fb2b | ||
|
|
de8046288b | ||
|
|
7d07008871 | ||
|
|
d4da0a6d6a | ||
|
|
aafc9680bf | ||
|
|
9aded3a552 | ||
|
|
03284959d6 | ||
|
|
4844692bd9 | ||
|
|
74052e4542 | ||
|
|
282cb4be95 | ||
|
|
4f4d0c266a | ||
|
|
17637c32d4 | ||
|
|
66a1192739 | ||
|
|
e862537a20 | ||
|
|
a58bca390b | ||
|
|
e6d38f9338 | ||
|
|
1f65b744a0 | ||
|
|
d9a1e6aba7 | ||
|
|
8cb0021b9f | ||
|
|
8042c4ffc1 | ||
|
|
cc8662445c | ||
|
|
64a04f70a3 | ||
|
|
b06287da23 | ||
|
|
83821d1e04 | ||
|
|
68eff40753 | ||
|
|
50dc79bc8d | ||
|
|
f95a3f336b | ||
|
|
ea3ab21beb |
@@ -1,6 +1,10 @@
|
||||
#
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
|
||||
[*.js]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
@@ -23,4 +27,4 @@ indent_style = tab
|
||||
# Matches the exact files either package.json or .travis.yml
|
||||
[{package.json, .travis.yml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
indent_size = 2
|
||||
86
.github/scripts/build.sh
vendored
Normal file
86
.github/scripts/build.sh
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
echo "Version: ${VERSION}"
|
||||
echo "Full Version: ${FULL_VERSION}"
|
||||
echo "Package name: ${TAR_NAME}"
|
||||
echo "Current directory: ${BASE_DIR}"
|
||||
|
||||
echo "Cleaning files"
|
||||
|
||||
# Leftover individual files to delete
|
||||
declare -a remove_files=(
|
||||
.git
|
||||
.github
|
||||
.sass-cache
|
||||
.idea
|
||||
.travis
|
||||
docker
|
||||
_ide_helper.php
|
||||
.dockerignore
|
||||
.dpl
|
||||
.editorconfig
|
||||
.eslintignore
|
||||
.eslintrc
|
||||
.php_cs
|
||||
.php_cs.cache
|
||||
.phpstorm.meta.php
|
||||
.styleci.yml
|
||||
.phpunit.result.cache
|
||||
env.php
|
||||
intellij_style.xml
|
||||
config.php
|
||||
docker-compose.yml
|
||||
Makefile
|
||||
phpcs.xml
|
||||
phpunit.xml
|
||||
phpvms.iml
|
||||
Procfile
|
||||
phpstan.neon
|
||||
node_modules
|
||||
composer.phar
|
||||
vendor/willdurand/geocoder/tests
|
||||
)
|
||||
|
||||
for file in "${remove_files[@]}"; do
|
||||
rm -rf $file
|
||||
done
|
||||
|
||||
find ./vendor -type d -name ".git" -print0 | xargs rm -rf
|
||||
find . -type d -name "sass-cache" -print0 | xargs rm -rf
|
||||
|
||||
# clear any app specific stuff that might have been loaded in
|
||||
find bootstrap/cache -mindepth 1 -maxdepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
|
||||
find storage/app -mindepth 1 -maxdepth 1 -not -name '.gitignore' -not -name public -not -name import -print0 -exec rm -rf {} +
|
||||
find storage/app/public -mindepth 1 -maxdepth 1 -not -name '.gitignore' -not -name avatars -not -name uploads -print0 -exec rm -rf {} +
|
||||
find storage/app/public/avatars -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
|
||||
find storage/app/public/uploads -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
|
||||
find storage/debugbar -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
|
||||
find storage/docker -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
|
||||
find storage/framework/cache -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
|
||||
find storage/framework/sessions -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
|
||||
find storage/framework/views -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
|
||||
find storage/logs -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
|
||||
|
||||
mkdir -p storage/app/public/avatars
|
||||
mkdir -p storage/app/public/uploads
|
||||
mkdir -p storage/framework/cache
|
||||
mkdir -p storage/framework/sessions
|
||||
mkdir -p storage/framework/views
|
||||
|
||||
cd /tmp
|
||||
|
||||
ls -al $BASE_DIR/../
|
||||
|
||||
tar -czf $TAR_NAME -C $BASE_DIR .
|
||||
sha256sum $TAR_NAME >"$TAR_NAME.sha256"
|
||||
tar2zip $TAR_NAME
|
||||
sha256sum $ZIP_NAME >"$ZIP_NAME.sha256"
|
||||
|
||||
ls -al /tmp
|
||||
|
||||
echo "Moving to dist"
|
||||
mkdir -p $BASE_DIR/dist
|
||||
cd $BASE_DIR/dist
|
||||
|
||||
mv "/tmp/$TAR_NAME" "/tmp/$ZIP_NAME" "/tmp/$TAR_NAME.sha256" "/tmp/$ZIP_NAME.sha256" .
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
<?php
|
||||
exit();
|
||||
?>
|
||||
|
||||
APP_ENV="dev"
|
||||
APP_KEY="base64:zdgcDqu9PM8uGWCtMxd74ZqdGJIrnw812oRMmwDF6KY="
|
||||
APP_URL="http://localhost"
|
||||
0
.travis/my.cnf → .github/scripts/my.cnf
vendored
0
.travis/my.cnf → .github/scripts/my.cnf
vendored
@@ -21,9 +21,9 @@
|
||||
<directory suffix=".php">./app</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
<listeners>
|
||||
<!--<listeners>
|
||||
<listener class="NunoMaduro\Collision\Adapters\Phpunit\Listener"/>
|
||||
</listeners>
|
||||
</listeners>-->
|
||||
<php>
|
||||
<ini name="error_reporting" value="E_ALL"/>
|
||||
<ini name="display_errors" value="On"/>
|
||||
36
.github/scripts/version.sh
vendored
Normal file
36
.github/scripts/version.sh
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if test "$GIT_TAG_NAME"; then
|
||||
export VERSION=$GIT_TAG_NAME
|
||||
|
||||
# Pass in the tag as the version to write out
|
||||
php artisan phpvms:version --write --write-full-version "${VERSION}"
|
||||
export FULL_VERSION=$(php artisan phpvms:version)
|
||||
else
|
||||
export BRANCH=${GITHUB_REF##*/}
|
||||
echo "On branch $BRANCH"
|
||||
|
||||
# Write the version out but place the branch ID in there
|
||||
# This is only for the dev branch
|
||||
export BASE_VERSION=$(php artisan phpvms:version --base-only)
|
||||
|
||||
# This now includes the pre-release version, so "-dev" by default
|
||||
export VERSION=${BASE_VERSION}
|
||||
|
||||
# Don't pass in a version here, just write out the latest hash
|
||||
php artisan phpvms:version --write "${VERSION}"
|
||||
export FULL_VERSION=$(php artisan phpvms:version)
|
||||
fi
|
||||
|
||||
export FILE_NAME="phpvms-${VERSION}"
|
||||
export TAR_NAME="$FILE_NAME.tar.gz"
|
||||
export ZIP_NAME="$FILE_NAME.zip"
|
||||
export BASE_DIR=`pwd`
|
||||
|
||||
# https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#environment-files
|
||||
echo "BRANCH=${BRANCH}" >> $GITHUB_ENV
|
||||
echo "FILE_NAME=${FILE_NAME}" >> $GITHUB_ENV
|
||||
echo "TAR_NAME=${TAR_NAME}" >> $GITHUB_ENV
|
||||
echo "ZIP_NAME=${ZIP_NAME}" >> $GITHUB_ENV
|
||||
echo "BASE_DIR=${BASE_DIR}" >> $GITHUB_ENV
|
||||
echo "DISCORD_MSG=Version ${FULL_VERSION} is available, download: [zip](http://downloads.phpvms.net/$ZIP_NAME) | [tar](http://downloads.phpvms.net/$TAR_NAME)" >> $GITHUB_ENV
|
||||
249
.github/workflows/build.yml
vendored
Normal file
249
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,249 @@
|
||||
name: 'Build'
|
||||
on: ['push', 'pull_request', 'workflow_dispatch', 'release']
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-18.04
|
||||
if: github.repository == 'nabeelio/phpvms'
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
php-versions: ['7.3', '7.4']
|
||||
name: PHP ${{ matrix.php-versions }}
|
||||
env:
|
||||
extensions: intl, pcov, mbstring
|
||||
key: cache-v1
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Configure Caching
|
||||
- name: Setup cache environment
|
||||
id: cache-env
|
||||
uses: shivammathur/cache-extensions@v1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
extensions: ${{ env.extensions }}
|
||||
key: ${{ env.key }}
|
||||
|
||||
- name: Cache extensions
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ steps.cache-env.outputs.dir }}
|
||||
key: ${{ steps.cache-env.outputs.key }}
|
||||
restore-keys: ${{ steps.cache-env.outputs.key }}
|
||||
|
||||
- name: Get composer cache directory
|
||||
id: composer-cache
|
||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.composer-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: ${{ runner.os }}-composer-
|
||||
|
||||
# Configure PHP
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
extensions: ${{ env.extensions }}
|
||||
ini-values: post_max_size=256M, short_open_tag=On
|
||||
coverage: xdebug
|
||||
tools: php-cs-fixer, phpunit
|
||||
|
||||
- name: Shutdown Ubuntu MySQL
|
||||
run: sudo service mysql stop
|
||||
|
||||
- name: Install MariaDB
|
||||
uses: getong/mariadb-action@v1.1
|
||||
with:
|
||||
character set server: 'utf8'
|
||||
collation server: 'utf8_general_ci'
|
||||
mysql database: 'phpvms'
|
||||
mysql root password: ''
|
||||
mysql user: ''
|
||||
mysql password: ''
|
||||
|
||||
- name: Configure Environment
|
||||
run: |
|
||||
php --version
|
||||
mysql --version
|
||||
# Downgrade composer version to 1.x
|
||||
composer install --dev --no-interaction --verbose
|
||||
cp .github/scripts/env.php env.php
|
||||
cp .github/scripts/phpunit.xml phpunit.xml
|
||||
php artisan database:create --reset
|
||||
php artisan migrate:refresh --seed
|
||||
|
||||
- name: Run Tests
|
||||
run: |
|
||||
vendor/bin/php-cs-fixer fix --config=.php_cs -v --dry-run --diff --using-cache=no
|
||||
vendor/bin/phpunit --debug --verbose
|
||||
|
||||
# This runs after all of the tests, run have run. Creates a cleaned up version of the
|
||||
# distro, and then creates the artifact to push up to S3 or wherever
|
||||
artifacts:
|
||||
name: 'Create dev build'
|
||||
needs: build
|
||||
runs-on: 'ubuntu-18.04'
|
||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '7.4'
|
||||
|
||||
- uses: olegtarasov/get-tag@v2.1
|
||||
id: tagName
|
||||
|
||||
# Configure Caching
|
||||
- name: Get composer cache directory
|
||||
id: composer-cache
|
||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.composer-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: ${{ runner.os }}-composer-
|
||||
|
||||
# Dependencies
|
||||
- name: 'Install Release Dependencies'
|
||||
run: |
|
||||
rm -rf vendor
|
||||
sudo npm i tar-to-zip -g
|
||||
composer install --no-dev --prefer-dist --no-interaction --verbose
|
||||
sudo chmod +x ./.github/scripts/*
|
||||
|
||||
- name: Get version
|
||||
run: .github/scripts/version.sh
|
||||
|
||||
- name: Build Distro
|
||||
run: .github/scripts/build.sh
|
||||
|
||||
- name: Upload S3
|
||||
uses: shallwefootball/s3-upload-action@v1.1.3
|
||||
with:
|
||||
aws_key_id: ${{ secrets.S3_BUILD_ARTIFACTS_ACCESS_KEY_ID }}
|
||||
aws_secret_access_key: ${{ secrets.S3_BUILD_ARTIFACTS_SECRET_ACCESS_KEY}}
|
||||
aws_bucket: ${{ secrets.S3_BUCKET_NAME }}
|
||||
source_dir: 'dist'
|
||||
destination_dir: ''
|
||||
|
||||
- name: Discord notification
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
uses: Ilshidur/action-discord@0.3.0
|
||||
with:
|
||||
# DISCORD_MSG is defined in versions.sh
|
||||
args: '{{ DISCORD_MSG }}'
|
||||
|
||||
# This runs after all of the tests, run have run. Creates a cleaned up version of the
|
||||
# distro, and then creates the artifact to push up to S3 or wherever
|
||||
# https://github.com/actions/create-release
|
||||
release:
|
||||
name: 'Create Release'
|
||||
needs: build
|
||||
runs-on: 'ubuntu-18.04'
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '7.4'
|
||||
|
||||
- uses: olegtarasov/get-tag@v2.1
|
||||
id: tagName
|
||||
|
||||
# Configure Caching
|
||||
- name: Get composer cache directory
|
||||
id: composer-cache
|
||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.composer-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: ${{ runner.os }}-composer-
|
||||
|
||||
# Dependencies
|
||||
- name: 'Install Release Dependencies'
|
||||
run: |
|
||||
rm -rf vendor
|
||||
sudo npm i tar-to-zip -g
|
||||
composer install --no-dev --prefer-dist --no-interaction --verbose
|
||||
sudo chmod +x ./.github/scripts/*
|
||||
|
||||
- name: Get version
|
||||
run: .github/scripts/version.sh
|
||||
|
||||
- name: Build Distro
|
||||
run: .github/scripts/build.sh
|
||||
|
||||
- name: Upload S3
|
||||
uses: shallwefootball/s3-upload-action@v1.1.3
|
||||
with:
|
||||
aws_key_id: ${{ secrets.S3_BUILD_ARTIFACTS_ACCESS_KEY_ID }}
|
||||
aws_secret_access_key: ${{ secrets.S3_BUILD_ARTIFACTS_SECRET_ACCESS_KEY}}
|
||||
aws_bucket: ${{ secrets.S3_BUCKET_NAME }}
|
||||
source_dir: 'dist'
|
||||
destination_dir: ''
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Get version
|
||||
run: .github/scripts/version.sh
|
||||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: Release ${{ github.ref }}
|
||||
draft: true
|
||||
prerelease: false
|
||||
|
||||
# Upload the tar file to the release
|
||||
- name: Upload Tar Asset
|
||||
id: upload-tar-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: dist/{{TAR_NAME}}
|
||||
asset_name: '{{ TAR_NAME }}'
|
||||
asset_content_type: application/gzip
|
||||
|
||||
# upload the zip file to the release
|
||||
- name: Upload Zip Asset
|
||||
id: upload-zip-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: dist/{{ZIP_NAME}}
|
||||
asset_name: '{{ ZIP_NAME }}'
|
||||
asset_content_type: application/zip
|
||||
|
||||
- name: Discord notification
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
uses: Ilshidur/action-discord@0.3.0
|
||||
with:
|
||||
# DISCORD_MSG is defined in versions.sh
|
||||
args: '{{ DISCORD_MSG }}'
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -29,6 +29,7 @@ env.php
|
||||
#Homestead.yaml
|
||||
Homestead.json
|
||||
LocalValetDriver.php
|
||||
docker-compose-profiler.yml
|
||||
|
||||
# Rocketeer PHP task runner and deployment package. https://github.com/rocketeers/rocketeer
|
||||
.rocketeer/
|
||||
|
||||
160
.travis.yml
160
.travis.yml
@@ -1,160 +0,0 @@
|
||||
#
|
||||
# Travis CI config file
|
||||
#
|
||||
|
||||
language: php
|
||||
php:
|
||||
- '7.2'
|
||||
- '7.3'
|
||||
- '7.4'
|
||||
|
||||
env:
|
||||
- DB=mysql
|
||||
- DB=mariadb
|
||||
|
||||
cache:
|
||||
# Cache lives for 10 min
|
||||
# Default of 3m might not be long enough for all the runs
|
||||
timeout: 600
|
||||
directories:
|
||||
- "$HOME/.composer/cache"
|
||||
- "$HOME/.npm"
|
||||
|
||||
services:
|
||||
- mysql
|
||||
|
||||
addons:
|
||||
mariadb: '10.2'
|
||||
|
||||
install:
|
||||
- php --version
|
||||
- mysql --version
|
||||
- composer install --dev --no-interaction --verbose
|
||||
- cp .travis/env.travis.php env.php
|
||||
- cp .travis/phpunit.travis.xml phpunit.xml
|
||||
|
||||
before_script:
|
||||
- php artisan database:create --reset
|
||||
- php artisan migrate:refresh --seed
|
||||
|
||||
script:
|
||||
- vendor/bin/php-cs-fixer fix --config=.php_cs -v --dry-run --diff --using-cache=no
|
||||
- vendor/bin/phpunit --debug --verbose
|
||||
|
||||
after_failure:
|
||||
- cat storage/logs/*.log
|
||||
|
||||
# Refer to: https://github.com/doctrine/dbal/blob/master/.travis.yml#L39
|
||||
jobs:
|
||||
include:
|
||||
# Different test stages
|
||||
# - stage: Test
|
||||
# name: PHP 7.2 + MySQL 5.7
|
||||
# php: 7.2
|
||||
# env: DB=mysql
|
||||
# services:
|
||||
# - mysql
|
||||
# - stage: Test
|
||||
# name: PHP 7.3 + MySQL 5.7
|
||||
# php: 7.3
|
||||
# env: DB=mysql
|
||||
# services:
|
||||
# - mysql
|
||||
# - stage: Test
|
||||
# name: PHP 7.4 + MySQL 5.7
|
||||
# php: 7.4
|
||||
# env: DB=mysql
|
||||
# services:
|
||||
# - mysql
|
||||
# - stage: Test
|
||||
# name: PHP 7.2 + MariaDB 10.1
|
||||
# php: 7.2
|
||||
# env: DB=mariadb
|
||||
# addons:
|
||||
# mariadb: '10.1'
|
||||
# - stage: Test
|
||||
# name: PHP 7.3 + MariaDB 10.1
|
||||
# php: 7.3
|
||||
# env: DB=mariadb
|
||||
# addons:
|
||||
# mariadb: '10.1'
|
||||
# - stage: Test
|
||||
# name: PHP 7.4 + MariaDB 10.1
|
||||
# php: 7.4
|
||||
# env: DB=mariadb MARIADB_VERSION=10.1
|
||||
# addons:
|
||||
# mariadb: '10.1'
|
||||
# - stage: Test
|
||||
# name: PHP 7.2 + MariaDB 10.2
|
||||
# php: 7.2
|
||||
# env: DB=mariadb
|
||||
# addons:
|
||||
# mariadb: '10.2'
|
||||
# - stage: Test
|
||||
# name: PHP 7.3 + MariaDB 10.3
|
||||
# php: 7.3
|
||||
# env: DB=mariadb
|
||||
# addons:
|
||||
# mariadb: '10.2'
|
||||
# - stage: Test
|
||||
# name: PHP 7.4 + MariaDB 10.2
|
||||
# php: 7.4
|
||||
# env: DB=mariadb
|
||||
# addons:
|
||||
# mariadb: '10.2'
|
||||
# - stage: Test
|
||||
# name: PHP 7.2 + MariaDB 10.3
|
||||
# php: 7.2
|
||||
# env: DB=mariadb
|
||||
# addons:
|
||||
# mariadb: '10.3'
|
||||
# - stage: Test
|
||||
# name: PHP 7.3 + MariaDB 10.3
|
||||
# php: 7.3
|
||||
# env: DB=mariadb
|
||||
# addons:
|
||||
# mariadb: '10.3'
|
||||
# - stage: Test
|
||||
# name: PHP 7.4 + MariaDB 10.3
|
||||
# php: 7.4
|
||||
# env: DB=mariadb
|
||||
# addons:
|
||||
# mariadb: '10.3'
|
||||
|
||||
# Just packages up a release
|
||||
- stage: package
|
||||
script: skip
|
||||
before_deploy:
|
||||
- curl -sL https://raw.githubusercontent.com/travis-ci/artifacts/6b10798/install | bash
|
||||
|
||||
# Configure the conditional deployment
|
||||
# https://docs.travis-ci.com/user/deployment/#examples-of-conditional-deployment
|
||||
deploy:
|
||||
- provider: script
|
||||
skip_cleanup: true
|
||||
script: ./.travis/deploy_script.sh
|
||||
on:
|
||||
all_branches: true
|
||||
repo: nabeelio/phpvms
|
||||
php: '7.2'
|
||||
tags: false
|
||||
|
||||
# RELEASE STAGE
|
||||
# Only runs when there's a tag applied to this release (tag should be the version)
|
||||
# This uses Github Releases and posts it there (provider: releases)
|
||||
# https://docs.travis-ci.com/user/deployment/releases
|
||||
- stage: release
|
||||
script: skip
|
||||
before_deploy:
|
||||
- curl -sL https://raw.githubusercontent.com/travis-ci/artifacts/6b10798/install | bash
|
||||
- ./.travis/deploy_script.sh
|
||||
deploy:
|
||||
provider: releases
|
||||
skip_cleanup: true
|
||||
api_key: $GITHUB_TOKEN
|
||||
file_glob: true
|
||||
file: build/*
|
||||
on:
|
||||
tags: true
|
||||
repo: nabeelio/phpvms
|
||||
php: '7.2'
|
||||
@@ -1,132 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ "$TRAVIS" = "true" ]; then
|
||||
|
||||
cd $TRAVIS_BUILD_DIR
|
||||
|
||||
if test "$TRAVIS_TAG"; then
|
||||
PKG_NAME=$TRAVIS_TAG
|
||||
VERSION=$TRAVIS_TAG
|
||||
|
||||
# Pass in the tag as the version to write out
|
||||
php artisan phpvms:version --write $VERSION
|
||||
else
|
||||
echo "On branch $TRAVIS_BRANCH"
|
||||
|
||||
if [ "$TRAVIS_BRANCH" != "master" ] && [ "$TRAVIS_BRANCH" != "dev" ]; then
|
||||
echo "Not on valid branch, exiting"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Write the version out but place the branch ID in there
|
||||
# This is only for the dev branch
|
||||
BASE_VERSION=$(php artisan phpvms:version --base-only)
|
||||
|
||||
# This now includes the pre-release version, so "-dev" by default
|
||||
PKG_NAME=${BASE_VERSION}
|
||||
|
||||
# Don't pass in a version here, just write out the latest hash
|
||||
php artisan phpvms:version --write >VERSION
|
||||
VERSION=$(cat VERSION)
|
||||
fi
|
||||
|
||||
echo "Version: $VERSION"
|
||||
echo "Package name: $TAR_NAME"
|
||||
|
||||
FILE_NAME="phpvms-$PKG_NAME"
|
||||
TAR_NAME="$FILE_NAME.tar.gz"
|
||||
|
||||
echo "Cleaning files"
|
||||
|
||||
rm -rf vendor
|
||||
composer install --no-dev --prefer-dist --no-interaction --verbose
|
||||
|
||||
# Leftover individual files to delete
|
||||
declare -a remove_files=(
|
||||
.git
|
||||
.github
|
||||
.sass-cache
|
||||
.idea
|
||||
.travis
|
||||
docker
|
||||
_ide_helper.php
|
||||
.dockerignore
|
||||
.dpl
|
||||
.editorconfig
|
||||
.eslintignore
|
||||
.eslintrc
|
||||
.php_cs
|
||||
.php_cs.cache
|
||||
.phpstorm.meta.php
|
||||
.styleci.yml
|
||||
.phpunit.result.cache
|
||||
env.php
|
||||
intellij_style.xml
|
||||
config.php
|
||||
docker-compose.yml
|
||||
Makefile
|
||||
phpcs.xml
|
||||
phpunit.xml
|
||||
phpvms.iml
|
||||
Procfile
|
||||
phpstan.neon
|
||||
node_modules
|
||||
composer.phar
|
||||
vendor/willdurand/geocoder/tests
|
||||
)
|
||||
|
||||
for file in "${remove_files[@]}"; do
|
||||
rm -rf $file
|
||||
done
|
||||
|
||||
find ./vendor -type d -name ".git" -print0 | xargs rm -rf
|
||||
find . -type d -name "sass-cache" -print0 | xargs rm -rf
|
||||
|
||||
# clear any app specific stuff that might have been loaded in
|
||||
find bootstrap/cache -mindepth 1 -maxdepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
|
||||
find storage/app -mindepth 1 -maxdepth 1 -not -name '.gitignore' -not -name public -not -name import -print0 -exec rm -rf {} +
|
||||
find storage/app/public -mindepth 1 -maxdepth 1 -not -name '.gitignore' -not -name avatars -not -name uploads -print0 -exec rm -rf {} +
|
||||
find storage/app/public/avatars -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
|
||||
find storage/app/public/uploads -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
|
||||
find storage/debugbar -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
|
||||
find storage/docker -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
|
||||
find storage/framework/cache -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
|
||||
find storage/framework/sessions -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
|
||||
find storage/framework/views -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
|
||||
find storage/logs -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
|
||||
|
||||
mkdir -p storage/app/public/avatars
|
||||
mkdir -p storage/app/public/uploads
|
||||
mkdir -p storage/framework/cache
|
||||
mkdir -p storage/framework/sessions
|
||||
mkdir -p storage/framework/views
|
||||
|
||||
# Regenerate the autoloader and classes
|
||||
composer dump-autoload
|
||||
make clean
|
||||
|
||||
cd /tmp
|
||||
tar -czf $TAR_NAME -C $TRAVIS_BUILD_DIR/../ phpvms
|
||||
sha256sum $TAR_NAME >"$TAR_NAME.sha256"
|
||||
|
||||
echo "Uploading to S3"
|
||||
mkdir -p $TRAVIS_BUILD_DIR/build
|
||||
cd $TRAVIS_BUILD_DIR/build
|
||||
|
||||
mv "/tmp/$TAR_NAME" "/tmp/$TAR_NAME.sha256" .
|
||||
artifacts upload --target-paths "/" $TAR_NAME $TRAVIS_BUILD_DIR/VERSION $TAR_NAME.sha256
|
||||
|
||||
# Upload the version for a tagged release. Move to a version file in different
|
||||
# tags. Within phpVMS, we have an option of which version to track in the admin
|
||||
if test "$TRAVIS_TAG"; then
|
||||
echo "Uploading release version file"
|
||||
cp "$TRAVIS_BUILD_DIR/VERSION" release_version
|
||||
artifacts upload --target-paths "/" release_version
|
||||
else
|
||||
echo "Uploading ${TRAVIS_BRANCH}_version file"
|
||||
cp $TRAVIS_BUILD_DIR/VERSION ${TRAVIS_BRANCH}_version
|
||||
artifacts upload --target-paths "/" ${TRAVIS_BRANCH}_version
|
||||
fi
|
||||
|
||||
curl -X POST --data "{\"content\": \"A new build is available at http://downloads.phpvms.net/$TAR_NAME ($VERSION)\"}" -H "Content-Type: application/json" $DISCORD_WEBHOOK_URL
|
||||
fi
|
||||
709
CHANGELOG.md
709
CHANGELOG.md
@@ -1,9 +1,706 @@
|
||||
## Beta 2 (7.0.0-beta.2)
|
||||
# Changelog
|
||||
|
||||
- Switching to semver
|
||||
- PHP 7.2 minimum
|
||||
- Lots of fixes, view the [Github Milestone](https://github.com/nabeelio/phpvms/milestone/2?closed=1) for details
|
||||
## [7.0.0-beta.4](https://github.com/nabeelio/phpvms/tree/7.0.0-beta.4) (2020-05-09)
|
||||
|
||||
## Beta 1 (v7.0.0-beta)
|
||||
[Full Changelog](https://github.com/nabeelio/phpvms/compare/7.0.0-beta.3...7.0.0-beta.4)
|
||||
|
||||
- Initial Release
|
||||
**Implemented enhancements:**
|
||||
|
||||
- Move currency selection to admin settings [\#671](https://github.com/nabeelio/phpvms/issues/671)
|
||||
- Center live map to custom location [\#661](https://github.com/nabeelio/phpvms/issues/661)
|
||||
- Pilot Names - Pilots ID [\#656](https://github.com/nabeelio/phpvms/issues/656)
|
||||
- Simbrief sample data [\#651](https://github.com/nabeelio/phpvms/issues/651)
|
||||
- Simbrief only available for bids [\#642](https://github.com/nabeelio/phpvms/issues/642)
|
||||
- PIREP prefile download [\#634](https://github.com/nabeelio/phpvms/issues/634)
|
||||
- Importer - group imported aircraft by type [\#628](https://github.com/nabeelio/phpvms/issues/628)
|
||||
- API: When looking up flight, return the load factor [\#611](https://github.com/nabeelio/phpvms/issues/611)
|
||||
- API: On prefile, return required fields [\#610](https://github.com/nabeelio/phpvms/issues/610)
|
||||
- Center on active flights [\#605](https://github.com/nabeelio/phpvms/issues/605)
|
||||
- Profiling/performance improvments [\#602](https://github.com/nabeelio/phpvms/issues/602)
|
||||
- Aircraft stats resync [\#585](https://github.com/nabeelio/phpvms/issues/585)
|
||||
- Cron Job [\#553](https://github.com/nabeelio/phpvms/issues/553)
|
||||
- Importing a CSV with additional airports clears all previous airports [\#490](https://github.com/nabeelio/phpvms/issues/490)
|
||||
- Use continuation token instead of page/offset [\#469](https://github.com/nabeelio/phpvms/issues/469)
|
||||
- Combine the Util classes in Facade and Support [\#467](https://github.com/nabeelio/phpvms/issues/467)
|
||||
- ACARS/Live flight events [\#436](https://github.com/nabeelio/phpvms/issues/436)
|
||||
- Allow logo upload for airline [\#417](https://github.com/nabeelio/phpvms/issues/417)
|
||||
- Google Analytics Settings [\#382](https://github.com/nabeelio/phpvms/issues/382)
|
||||
- Let update only be run if logged in/admin [\#372](https://github.com/nabeelio/phpvms/issues/372)
|
||||
- Airport Lookup - possible additions [\#364](https://github.com/nabeelio/phpvms/issues/364)
|
||||
- Set flight type for expenses for flight [\#348](https://github.com/nabeelio/phpvms/issues/348)
|
||||
- Extend search schedule options [\#297](https://github.com/nabeelio/phpvms/issues/297)
|
||||
- Change currency from settings \#671 [\#672](https://github.com/nabeelio/phpvms/pull/672)
|
||||
- Add privatized version of name \#656 [\#658](https://github.com/nabeelio/phpvms/pull/658)
|
||||
- Add Simbrief entries as sample data for load \#651 [\#652](https://github.com/nabeelio/phpvms/pull/652)
|
||||
- Option for SB only on bids; add the new file type \#642 [\#643](https://github.com/nabeelio/phpvms/pull/643)
|
||||
- Account ICAO for subfleet, airline/location if columns exist \#628 [\#632](https://github.com/nabeelio/phpvms/pull/632)
|
||||
- Performance improvements \#602 [\#607](https://github.com/nabeelio/phpvms/pull/607)
|
||||
- Center on active flights \#605 [\#606](https://github.com/nabeelio/phpvms/pull/606)
|
||||
- Installer fixes, remove bcmath, fix design [\#596](https://github.com/nabeelio/phpvms/pull/596)
|
||||
- Remove airport length restrictions \#590 [\#592](https://github.com/nabeelio/phpvms/pull/592)
|
||||
- Remove 4 char restriction from ICAO; use decimal type for lat/lon \#590 [\#591](https://github.com/nabeelio/phpvms/pull/591)
|
||||
- Recalcuate aircraft stats in nightly cron and importer \#585 \#443 [\#587](https://github.com/nabeelio/phpvms/pull/587)
|
||||
- \(Importer\) Set the pay rate for the ranks \#443 [\#586](https://github.com/nabeelio/phpvms/pull/586)
|
||||
- Fix rowmapper generator, check for fields, map users \#443 [\#583](https://github.com/nabeelio/phpvms/pull/583)
|
||||
- Add bcmath to the required extensions list \#558 [\#564](https://github.com/nabeelio/phpvms/pull/564)
|
||||
- Add the argc\_argv flag for the cgi exec \#553 [\#556](https://github.com/nabeelio/phpvms/pull/556)
|
||||
- Add logo to the flights page if its set \#417 [\#550](https://github.com/nabeelio/phpvms/pull/550)
|
||||
- Add additional events for PIREP states \#436 [\#548](https://github.com/nabeelio/phpvms/pull/548)
|
||||
- Cleanup Utils \#467 [\#547](https://github.com/nabeelio/phpvms/pull/547)
|
||||
- Add checkbox to clear previous data when importing \#490 [\#546](https://github.com/nabeelio/phpvms/pull/546)
|
||||
- Distro zip file from tar file \#449 [\#543](https://github.com/nabeelio/phpvms/pull/543)
|
||||
- Spanish files translation [\#542](https://github.com/nabeelio/phpvms/pull/542)
|
||||
- Add link to download ACARS config from profile [\#539](https://github.com/nabeelio/phpvms/pull/539)
|
||||
- Format all blade templates to 2 spaces \#530 [\#531](https://github.com/nabeelio/phpvms/pull/531)
|
||||
- Add menu bar for mobile [\#529](https://github.com/nabeelio/phpvms/pull/529)
|
||||
- Fix live and route map errors \#527 [\#528](https://github.com/nabeelio/phpvms/pull/528)
|
||||
- Set PIREPs page to public [\#526](https://github.com/nabeelio/phpvms/pull/526)
|
||||
- Try to clear caches before updating [\#522](https://github.com/nabeelio/phpvms/pull/522)
|
||||
- Reduce number of queries for update check [\#520](https://github.com/nabeelio/phpvms/pull/520)
|
||||
- Add getRootDomain\(\) to Utils [\#514](https://github.com/nabeelio/phpvms/pull/514)
|
||||
- Search flights by subfleet \#484 [\#506](https://github.com/nabeelio/phpvms/pull/506)
|
||||
- Add base Dockerfile for Dockerhub upload [\#504](https://github.com/nabeelio/phpvms/pull/504)
|
||||
- Add reference to docs on doc site [\#502](https://github.com/nabeelio/phpvms/pull/502)
|
||||
- Add new command to export a specific PIREP for debugging [\#501](https://github.com/nabeelio/phpvms/pull/501)
|
||||
- Flight search for departure/arrival airports not using column names [\#496](https://github.com/nabeelio/phpvms/pull/496)
|
||||
- Split the importer module out from the installer module [\#468](https://github.com/nabeelio/phpvms/pull/468)
|
||||
|
||||
**Fixed bugs:**
|
||||
|
||||
- Aircraft hours not counting [\#683](https://github.com/nabeelio/phpvms/issues/683)
|
||||
- Error creating first user/airline [\#677](https://github.com/nabeelio/phpvms/issues/677)
|
||||
- submitting PIREP: Page Not Found [\#676](https://github.com/nabeelio/phpvms/issues/676)
|
||||
- Filing manual report causes SimBrief Error [\#668](https://github.com/nabeelio/phpvms/issues/668)
|
||||
- Error on finance page in admin [\#667](https://github.com/nabeelio/phpvms/issues/667)
|
||||
- API: User bids aren't loading SimBrief data for flight [\#664](https://github.com/nabeelio/phpvms/issues/664)
|
||||
- .: Links to pilot profiles :. [\#655](https://github.com/nabeelio/phpvms/issues/655)
|
||||
- Some domains \(ex, .co.uk\) not properly parsed [\#647](https://github.com/nabeelio/phpvms/issues/647)
|
||||
- API: Load bids through the bids.flight fields, not the flights field on the user [\#639](https://github.com/nabeelio/phpvms/issues/639)
|
||||
- Login page not using theme [\#638](https://github.com/nabeelio/phpvms/issues/638)
|
||||
- CSV import error says "csv not found" [\#636](https://github.com/nabeelio/phpvms/issues/636)
|
||||
- Importer - schedules not importing properly [\#630](https://github.com/nabeelio/phpvms/issues/630)
|
||||
- Disable using of php opcache [\#625](https://github.com/nabeelio/phpvms/issues/625)
|
||||
- API: Flight fields are an array when empty [\#618](https://github.com/nabeelio/phpvms/issues/618)
|
||||
- "Pending Pireps" in admin is blank [\#616](https://github.com/nabeelio/phpvms/issues/616)
|
||||
- Flight fields show all fields, not custom added ones [\#614](https://github.com/nabeelio/phpvms/issues/614)
|
||||
- Mixed content causes error [\#612](https://github.com/nabeelio/phpvms/issues/612)
|
||||
- Fares not appearing in API response for user/subfleets [\#608](https://github.com/nabeelio/phpvms/issues/608)
|
||||
- Not selecting active for aircraft shows nullable error [\#603](https://github.com/nabeelio/phpvms/issues/603)
|
||||
- Airports page repeats airport name \(infinite loop\) [\#599](https://github.com/nabeelio/phpvms/issues/599)
|
||||
- Calculate Distance button not working [\#595](https://github.com/nabeelio/phpvms/issues/595)
|
||||
- Support Seaports with 3 letter IATA/ID codes [\#590](https://github.com/nabeelio/phpvms/issues/590)
|
||||
- Hubs only show for registration [\#580](https://github.com/nabeelio/phpvms/issues/580)
|
||||
- Error when updating user in admin [\#576](https://github.com/nabeelio/phpvms/issues/576)
|
||||
- Updater not working because Source repository \[github\] is not defined [\#575](https://github.com/nabeelio/phpvms/issues/575)
|
||||
- Flights Page Search Subfleet Column [\#574](https://github.com/nabeelio/phpvms/issues/574)
|
||||
- Duplicate key entry for ACARS data [\#572](https://github.com/nabeelio/phpvms/issues/572)
|
||||
- No hint path defined for updater [\#570](https://github.com/nabeelio/phpvms/issues/570)
|
||||
- My Bids Page Error [\#561](https://github.com/nabeelio/phpvms/issues/561)
|
||||
- I can't change Current Theme [\#554](https://github.com/nabeelio/phpvms/issues/554)
|
||||
- Pilots cannot use the dashboard or flights without admin rights [\#480](https://github.com/nabeelio/phpvms/issues/480)
|
||||
- Database prefix not being applied [\#442](https://github.com/nabeelio/phpvms/issues/442)
|
||||
- Install not working [\#411](https://github.com/nabeelio/phpvms/issues/411)
|
||||
- typo in dependency on 'leaflet.geodesic' [\#687](https://github.com/nabeelio/phpvms/pull/687)
|
||||
- Emails/notifications not sending \#675 [\#686](https://github.com/nabeelio/phpvms/pull/686)
|
||||
- Aircraft hours not showing/incrementing \#683 [\#684](https://github.com/nabeelio/phpvms/pull/684)
|
||||
- METAR: KM as unit in visibility \#680 [\#682](https://github.com/nabeelio/phpvms/pull/682)
|
||||
- Blank/null IATA code isn't unique when added \#679 [\#681](https://github.com/nabeelio/phpvms/pull/681)
|
||||
- Fix airline creation in installer \#677 [\#678](https://github.com/nabeelio/phpvms/pull/678)
|
||||
- Journal not created when airline is created \#667 [\#670](https://github.com/nabeelio/phpvms/pull/670)
|
||||
- Check for SB being avail before filing \#668 [\#669](https://github.com/nabeelio/phpvms/pull/669)
|
||||
- Load Simbrief and flight data when getting bids \#664 [\#665](https://github.com/nabeelio/phpvms/pull/665)
|
||||
- Fix pilots page not showing up \#655 [\#660](https://github.com/nabeelio/phpvms/pull/660)
|
||||
- Fix PirepComment response; 201 to 200 [\#654](https://github.com/nabeelio/phpvms/pull/654)
|
||||
- Domain detection failing for .co.uk, etc \#647 [\#648](https://github.com/nabeelio/phpvms/pull/648)
|
||||
- Auth routes not using themes \#638 [\#645](https://github.com/nabeelio/phpvms/pull/645)
|
||||
- Don't return bids by default, fix user flight column \#639 [\#640](https://github.com/nabeelio/phpvms/pull/640)
|
||||
- Account for admin role, don't error out on null rows \#632 [\#637](https://github.com/nabeelio/phpvms/pull/637)
|
||||
- Fix airline mapping for aircraft \#628 [\#633](https://github.com/nabeelio/phpvms/pull/633)
|
||||
- Increase ID column size; seed ID generator with uniqid\(\) \#630 [\#631](https://github.com/nabeelio/phpvms/pull/631)
|
||||
- Disable using apc/opcache by default if found \#625 [\#629](https://github.com/nabeelio/phpvms/pull/629)
|
||||
- Fix saving of fare \#621 [\#624](https://github.com/nabeelio/phpvms/pull/624)
|
||||
- API: Flight fields are an array when empty \#618 [\#619](https://github.com/nabeelio/phpvms/pull/619)
|
||||
- Remove the flight fields link from admin \#614 [\#615](https://github.com/nabeelio/phpvms/pull/615)
|
||||
- HTTP/HTTPS mixed content errors \#612 [\#613](https://github.com/nabeelio/phpvms/pull/613)
|
||||
- Fare information not included in subfleet response \#608 [\#609](https://github.com/nabeelio/phpvms/pull/609)
|
||||
- Aircraft status field blank causes error \#603 [\#604](https://github.com/nabeelio/phpvms/pull/604)
|
||||
- METAR parsing infinite loop bugfix \#599 [\#600](https://github.com/nabeelio/phpvms/pull/600)
|
||||
- Table prefixes not being added to indexes [\#597](https://github.com/nabeelio/phpvms/pull/597)
|
||||
- Import expense and ledger entries \#443 [\#588](https://github.com/nabeelio/phpvms/pull/588)
|
||||
- User country mapping; ignore unused groups \#443 [\#584](https://github.com/nabeelio/phpvms/pull/584)
|
||||
- Change fuel used to optional \#512 [\#582](https://github.com/nabeelio/phpvms/pull/582)
|
||||
- Respect home hubs setting for registration \#580 [\#581](https://github.com/nabeelio/phpvms/pull/581)
|
||||
- Upstream null version; build version tags not being saved properly \#575 [\#578](https://github.com/nabeelio/phpvms/pull/578)
|
||||
- Fix edit pilot error \(Facade\Utils missing\) \#576 [\#577](https://github.com/nabeelio/phpvms/pull/577)
|
||||
- Upsert on ACARS positions \#572 [\#573](https://github.com/nabeelio/phpvms/pull/573)
|
||||
- Fix the namespace path on updater templates \#570 [\#571](https://github.com/nabeelio/phpvms/pull/571)
|
||||
- Route not found error for Pirep::resource\(\) call \#559 [\#565](https://github.com/nabeelio/phpvms/pull/565)
|
||||
- Add extra check for $acars being set \#560 [\#563](https://github.com/nabeelio/phpvms/pull/563)
|
||||
- Missing $subfleet error on bids page \#561 [\#562](https://github.com/nabeelio/phpvms/pull/562)
|
||||
- Refresh theme cache on settings page load \#554 [\#557](https://github.com/nabeelio/phpvms/pull/557)
|
||||
- Fix migrations when table prefix is involved \#442 [\#555](https://github.com/nabeelio/phpvms/pull/555)
|
||||
- Use optional\(\) around the airport fields [\#537](https://github.com/nabeelio/phpvms/pull/537)
|
||||
- PIREPS resource except for show [\#536](https://github.com/nabeelio/phpvms/pull/536)
|
||||
- Fix import during flight cron \#532 [\#535](https://github.com/nabeelio/phpvms/pull/535)
|
||||
- Fix PIREP edit endpoint [\#534](https://github.com/nabeelio/phpvms/pull/534)
|
||||
- Add a public\_url\(\) helper \#513 [\#519](https://github.com/nabeelio/phpvms/pull/519)
|
||||
- Correct text for no subfleets \#507 [\#518](https://github.com/nabeelio/phpvms/pull/518)
|
||||
- Error page not showing when database isn't configured [\#517](https://github.com/nabeelio/phpvms/pull/517)
|
||||
- Check user permissions on the routes \#508 [\#516](https://github.com/nabeelio/phpvms/pull/516)
|
||||
- Show admin dropdown for admin-access ability [\#515](https://github.com/nabeelio/phpvms/pull/515)
|
||||
- New subfleet not being attached to an airline on import \#479 [\#505](https://github.com/nabeelio/phpvms/pull/505)
|
||||
- Importing not updating existing items \#486 [\#503](https://github.com/nabeelio/phpvms/pull/503)
|
||||
- Set a default model value for airports on PIREP [\#500](https://github.com/nabeelio/phpvms/pull/500)
|
||||
- Fix GeoService errors when viewing PIREP \#498 [\#499](https://github.com/nabeelio/phpvms/pull/499)
|
||||
- Properly set the distance/planned\_distance [\#497](https://github.com/nabeelio/phpvms/pull/497)
|
||||
- 491 Installation Error [\#495](https://github.com/nabeelio/phpvms/pull/495)
|
||||
- Return the flight fares if there are no subfleet fares \#488 [\#489](https://github.com/nabeelio/phpvms/pull/489)
|
||||
- Error if there are no roles when editing a user \#480 [\#483](https://github.com/nabeelio/phpvms/pull/483)
|
||||
- Allow nullable field and calculate distance if nulled [\#482](https://github.com/nabeelio/phpvms/pull/482)
|
||||
- Pilots cannot use the dashboard or flights without admin rights [\#481](https://github.com/nabeelio/phpvms/pull/481)
|
||||
- Fix BindingResolutionError when debug toolbar isn't present [\#465](https://github.com/nabeelio/phpvms/pull/465)
|
||||
- Fix CSV imports giving Storage class not found \#454 [\#462](https://github.com/nabeelio/phpvms/pull/462)
|
||||
- Use PhpExecutableFinder\(\) closes \#457 \#458 [\#460](https://github.com/nabeelio/phpvms/pull/460)
|
||||
- Avoid proc\_open use \#455 [\#456](https://github.com/nabeelio/phpvms/pull/456)
|
||||
- Stricter checks on ACARS API data [\#451](https://github.com/nabeelio/phpvms/pull/451)
|
||||
- Remove bootstrap cache [\#448](https://github.com/nabeelio/phpvms/pull/448)
|
||||
|
||||
**Closed issues:**
|
||||
|
||||
- Dashboard error when METAR visibility in KM [\#680](https://github.com/nabeelio/phpvms/issues/680)
|
||||
- Error adding multiple airlines without IATA codes [\#679](https://github.com/nabeelio/phpvms/issues/679)
|
||||
- Pages [\#641](https://github.com/nabeelio/phpvms/issues/641)
|
||||
- Create a "fare type" for cargo [\#621](https://github.com/nabeelio/phpvms/issues/621)
|
||||
- Split Sample module out into separate repo [\#593](https://github.com/nabeelio/phpvms/issues/593)
|
||||
- No way to add files to fleet [\#567](https://github.com/nabeelio/phpvms/issues/567)
|
||||
- Map Center Coords [\#566](https://github.com/nabeelio/phpvms/issues/566)
|
||||
- Pilot Profile Page Error [\#560](https://github.com/nabeelio/phpvms/issues/560)
|
||||
- File New Pirep [\#559](https://github.com/nabeelio/phpvms/issues/559)
|
||||
- I can't add new flight [\#558](https://github.com/nabeelio/phpvms/issues/558)
|
||||
- Pilot Pay route modifier [\#487](https://github.com/nabeelio/phpvms/issues/487)
|
||||
- Auto-update [\#449](https://github.com/nabeelio/phpvms/issues/449)
|
||||
- Setting to not automatically calculate distances [\#446](https://github.com/nabeelio/phpvms/issues/446)
|
||||
- Classic importer [\#443](https://github.com/nabeelio/phpvms/issues/443)
|
||||
- SimBrief integration - pirep prefile [\#405](https://github.com/nabeelio/phpvms/issues/405)
|
||||
- PIREP rejection doesn't move pilot back to previous airport [\#392](https://github.com/nabeelio/phpvms/issues/392)
|
||||
- Load Factor for flights [\#352](https://github.com/nabeelio/phpvms/issues/352)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Upgrade packages with security alerts [\#653](https://github.com/nabeelio/phpvms/pull/653)
|
||||
- Add public/private pages \#641 [\#644](https://github.com/nabeelio/phpvms/pull/644)
|
||||
- SimBrief integration \#405 [\#635](https://github.com/nabeelio/phpvms/pull/635)
|
||||
- Add fare type for pax/cargo/mixed flights \#621 [\#623](https://github.com/nabeelio/phpvms/pull/623)
|
||||
- Add fixed pilot pay for a flight \#487 [\#622](https://github.com/nabeelio/phpvms/pull/622)
|
||||
- Add load factor and variance to flights \#352 [\#620](https://github.com/nabeelio/phpvms/pull/620)
|
||||
- Module/plugin installation working \#593 [\#594](https://github.com/nabeelio/phpvms/pull/594)
|
||||
- Add Google Analytics tracking ID to settings and to main template \#382 [\#551](https://github.com/nabeelio/phpvms/pull/551)
|
||||
- Set expenses on specific flight types \#348 [\#549](https://github.com/nabeelio/phpvms/pull/549)
|
||||
- Auto update \#449 [\#545](https://github.com/nabeelio/phpvms/pull/545)
|
||||
- Auto-update functionality \#449 [\#544](https://github.com/nabeelio/phpvms/pull/544)
|
||||
- ACARS XML config file download [\#540](https://github.com/nabeelio/phpvms/pull/540)
|
||||
- Make the fuel used optional [\#512](https://github.com/nabeelio/phpvms/pull/512)
|
||||
- Add PHP 7.4 support [\#464](https://github.com/nabeelio/phpvms/pull/464)
|
||||
- Replace importer with AJAX powered; better error handling \#443 [\#447](https://github.com/nabeelio/phpvms/pull/447)
|
||||
- Fix missing newsRepo variable [\#445](https://github.com/nabeelio/phpvms/pull/445)
|
||||
- Refactor and add importer to Installer module \#443 [\#444](https://github.com/nabeelio/phpvms/pull/444)
|
||||
- 391 Notification refactorings [\#441](https://github.com/nabeelio/phpvms/pull/441)
|
||||
|
||||
## [7.0.0-beta.3](https://github.com/nabeelio/phpvms/tree/7.0.0-beta.3) (2020-02-08)
|
||||
|
||||
[Full Changelog](https://github.com/nabeelio/phpvms/compare/7.0.0-beta.2...7.0.0-beta.3)
|
||||
|
||||
**Implemented enhancements:**
|
||||
|
||||
- Fix formatting in blade files [\#530](https://github.com/nabeelio/phpvms/issues/530)
|
||||
- Make PIREP view page public [\#525](https://github.com/nabeelio/phpvms/issues/525)
|
||||
- Fix map line colors [\#523](https://github.com/nabeelio/phpvms/issues/523)
|
||||
- Null-able fuel values on PIREP [\#510](https://github.com/nabeelio/phpvms/issues/510)
|
||||
- include subfleet in search options [\#484](https://github.com/nabeelio/phpvms/issues/484)
|
||||
- PHP 7.4 in Travis [\#463](https://github.com/nabeelio/phpvms/issues/463)
|
||||
- Move cron problem report to main page [\#458](https://github.com/nabeelio/phpvms/issues/458)
|
||||
|
||||
**Fixed bugs:**
|
||||
|
||||
- Method GET for /pireps/\<id\>/edit not supported [\#533](https://github.com/nabeelio/phpvms/issues/533)
|
||||
- Cron error for removing expired flights [\#532](https://github.com/nabeelio/phpvms/issues/532)
|
||||
- Live map marker click not working [\#527](https://github.com/nabeelio/phpvms/issues/527)
|
||||
- Redirect to installer properly [\#513](https://github.com/nabeelio/phpvms/issues/513)
|
||||
- Admin panel link not shown for users in role group [\#509](https://github.com/nabeelio/phpvms/issues/509)
|
||||
- Users without "admin" role can modify roles [\#508](https://github.com/nabeelio/phpvms/issues/508)
|
||||
- Edit flights page - text error [\#507](https://github.com/nabeelio/phpvms/issues/507)
|
||||
- Installation error with external databases [\#494](https://github.com/nabeelio/phpvms/issues/494)
|
||||
- Pirep not in KG [\#493](https://github.com/nabeelio/phpvms/issues/493)
|
||||
- Installation Error step2 [\#491](https://github.com/nabeelio/phpvms/issues/491)
|
||||
- Fares assigned to flights not working/overwritten by Subfleet [\#488](https://github.com/nabeelio/phpvms/issues/488)
|
||||
- Status not changing when importing CSV for aircraft [\#486](https://github.com/nabeelio/phpvms/issues/486)
|
||||
- Default Theme unusable on Mobile [\#485](https://github.com/nabeelio/phpvms/issues/485)
|
||||
- Fatal Error in subfleet page when importing routes with new aircraft [\#479](https://github.com/nabeelio/phpvms/issues/479)
|
||||
- Flights CSV import fails if no distance stipulated [\#478](https://github.com/nabeelio/phpvms/issues/478)
|
||||
- Subfleet CSV import [\#476](https://github.com/nabeelio/phpvms/issues/476)
|
||||
- Cron - DateTime::construct\(\) expects parameter 2 to be DateTimeZone, int given [\#461](https://github.com/nabeelio/phpvms/issues/461)
|
||||
- if PHP\_CLI not found in cron maintenance, put generic `php` exec there [\#457](https://github.com/nabeelio/phpvms/issues/457)
|
||||
- Importing schedule bug [\#454](https://github.com/nabeelio/phpvms/issues/454)
|
||||
- The updater/installer should clear all caches [\#408](https://github.com/nabeelio/phpvms/issues/408)
|
||||
|
||||
**Closed issues:**
|
||||
|
||||
- Error 500 when trying to access Dashboard. [\#498](https://github.com/nabeelio/phpvms/issues/498)
|
||||
- Import multiple aircraft of different subtypes in one sheet [\#477](https://github.com/nabeelio/phpvms/issues/477)
|
||||
- Split out installer/importer from updater [\#453](https://github.com/nabeelio/phpvms/issues/453)
|
||||
- ACARS update fields can be nulled [\#450](https://github.com/nabeelio/phpvms/issues/450)
|
||||
- Retryable HTTP client [\#430](https://github.com/nabeelio/phpvms/issues/430)
|
||||
- Pireps page: 'Pending' doesn't show pending PIREPs [\#427](https://github.com/nabeelio/phpvms/issues/427)
|
||||
- Email when news sent out [\#391](https://github.com/nabeelio/phpvms/issues/391)
|
||||
- Save cron last run time [\#386](https://github.com/nabeelio/phpvms/issues/386)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- 7.0.0-beta3 Release [\#541](https://github.com/nabeelio/phpvms/pull/541)
|
||||
|
||||
## [7.0.0-beta.2](https://github.com/nabeelio/phpvms/tree/7.0.0-beta.2) (2019-11-19)
|
||||
|
||||
[Full Changelog](https://github.com/nabeelio/phpvms/compare/v7.0.0-beta...7.0.0-beta.2)
|
||||
|
||||
**Implemented enhancements:**
|
||||
|
||||
- CSS Love needed for the Flights Page [\#418](https://github.com/nabeelio/phpvms/issues/418)
|
||||
- Add Subfleet, Custom Fields and Fares during initial schedule entry [\#410](https://github.com/nabeelio/phpvms/issues/410)
|
||||
- PIREP from flight/bid; orig: Bid not removed after flight accepted [\#406](https://github.com/nabeelio/phpvms/issues/406)
|
||||
- Auto airport lookup [\#404](https://github.com/nabeelio/phpvms/issues/404)
|
||||
- API Changes [\#389](https://github.com/nabeelio/phpvms/issues/389)
|
||||
- "Maintenance" section in admin [\#376](https://github.com/nabeelio/phpvms/issues/376)
|
||||
- Auto-calculate Distance on Add Flight page [\#355](https://github.com/nabeelio/phpvms/issues/355)
|
||||
- Change PIREP fuel field type [\#340](https://github.com/nabeelio/phpvms/issues/340)
|
||||
- Fuel in pireps [\#295](https://github.com/nabeelio/phpvms/issues/295)
|
||||
- Add field to set aircraft location [\#277](https://github.com/nabeelio/phpvms/issues/277)
|
||||
- Suggestion: edit pilot ID [\#265](https://github.com/nabeelio/phpvms/issues/265)
|
||||
- Combine subfleet and aircraft export [\#233](https://github.com/nabeelio/phpvms/issues/233)
|
||||
- Allow URL for downloads [\#229](https://github.com/nabeelio/phpvms/issues/229)
|
||||
- Move settings into database seeder [\#224](https://github.com/nabeelio/phpvms/issues/224)
|
||||
- Allow specifying transfer hours on registration [\#129](https://github.com/nabeelio/phpvms/issues/129)
|
||||
- Backend changes separating id from pilot\_id [\#324](https://github.com/nabeelio/phpvms/pull/324)
|
||||
|
||||
**Fixed bugs:**
|
||||
|
||||
- Flight ID's and Airport ICAO's not clickable on airport page [\#419](https://github.com/nabeelio/phpvms/issues/419)
|
||||
- Distance lookup needs bcmath extension [\#407](https://github.com/nabeelio/phpvms/issues/407)
|
||||
- Missing flight level field on frontend [\#401](https://github.com/nabeelio/phpvms/issues/401)
|
||||
- Set distance to 0 if no value [\#400](https://github.com/nabeelio/phpvms/issues/400)
|
||||
- Upload livery via admin [\#398](https://github.com/nabeelio/phpvms/issues/398)
|
||||
- Block deleting airline if there are assets associated with it [\#367](https://github.com/nabeelio/phpvms/issues/367)
|
||||
- Cron not calculating number of flights [\#357](https://github.com/nabeelio/phpvms/issues/357)
|
||||
- Error Seeing data of pilot profile [\#351](https://github.com/nabeelio/phpvms/issues/351)
|
||||
- Fresh install doesn't create rank [\#346](https://github.com/nabeelio/phpvms/issues/346)
|
||||
- Fuel cost only allows whole numbers for price [\#342](https://github.com/nabeelio/phpvms/issues/342)
|
||||
- API calls in subfolder going to root domain [\#339](https://github.com/nabeelio/phpvms/issues/339)
|
||||
- Errors versión 7.0.0 \(compilación 181025-6f7735\) [\#332](https://github.com/nabeelio/phpvms/issues/332)
|
||||
- Error on Install [\#303](https://github.com/nabeelio/phpvms/issues/303)
|
||||
- Having a "Error 505" when trying to install PHPVMS [\#302](https://github.com/nabeelio/phpvms/issues/302)
|
||||
- Error when viewing profile or trying to add flights [\#291](https://github.com/nabeelio/phpvms/issues/291)
|
||||
- "Hubs as home airport" doesn't work [\#288](https://github.com/nabeelio/phpvms/issues/288)
|
||||
- Undocumented Extension Required - PHP 7.2 GMP [\#285](https://github.com/nabeelio/phpvms/issues/285)
|
||||
- ErrorException Trying to get property 'name' of non-object [\#281](https://github.com/nabeelio/phpvms/issues/281)
|
||||
|
||||
**Closed issues:**
|
||||
|
||||
- Add settings.yaml changes to update available check [\#437](https://github.com/nabeelio/phpvms/issues/437)
|
||||
- Write current version to DB [\#428](https://github.com/nabeelio/phpvms/issues/428)
|
||||
- Message for configuring cron [\#424](https://github.com/nabeelio/phpvms/issues/424)
|
||||
- Opt in for telemetry on install [\#415](https://github.com/nabeelio/phpvms/issues/415)
|
||||
- Error when saving a PIREP without filling some fields and attempting to edit it [\#414](https://github.com/nabeelio/phpvms/issues/414)
|
||||
- Update htaccess file [\#412](https://github.com/nabeelio/phpvms/issues/412)
|
||||
- Allow typing in drop down menus [\#409](https://github.com/nabeelio/phpvms/issues/409)
|
||||
- Malformed email error on file [\#402](https://github.com/nabeelio/phpvms/issues/402)
|
||||
- Residual design issues from Bootstrap update [\#397](https://github.com/nabeelio/phpvms/issues/397)
|
||||
- Don't allow PIREP cancel if not in PENDING phase [\#395](https://github.com/nabeelio/phpvms/issues/395)
|
||||
- Pageable Criteria [\#390](https://github.com/nabeelio/phpvms/issues/390)
|
||||
- Update CSS Libraries [\#387](https://github.com/nabeelio/phpvms/issues/387)
|
||||
- Laravel 6 [\#384](https://github.com/nabeelio/phpvms/issues/384)
|
||||
- Profile menu dropdown [\#383](https://github.com/nabeelio/phpvms/issues/383)
|
||||
- Update vaCentral Library [\#380](https://github.com/nabeelio/phpvms/issues/380)
|
||||
- Implement Laravel 5.7 Notifications [\#378](https://github.com/nabeelio/phpvms/issues/378)
|
||||
- Generate random cache prefix on install [\#374](https://github.com/nabeelio/phpvms/issues/374)
|
||||
- Move transaction/journal code out of controller [\#370](https://github.com/nabeelio/phpvms/issues/370)
|
||||
- Add Contract for Airport information lookup [\#363](https://github.com/nabeelio/phpvms/issues/363)
|
||||
- RFC7807 - Standardize API error messages [\#361](https://github.com/nabeelio/phpvms/issues/361)
|
||||
- Imposible delete bid [\#360](https://github.com/nabeelio/phpvms/issues/360)
|
||||
- Change theme from settings [\#359](https://github.com/nabeelio/phpvms/issues/359)
|
||||
- Integration with PACX \[Feature\] [\#338](https://github.com/nabeelio/phpvms/issues/338)
|
||||
- Why don't you create a free ACARS for PHPVMS7 testing? [\#336](https://github.com/nabeelio/phpvms/issues/336)
|
||||
- Error add Roles [\#334](https://github.com/nabeelio/phpvms/issues/334)
|
||||
- Error during installation [\#333](https://github.com/nabeelio/phpvms/issues/333)
|
||||
- spatie - laravel-backup [\#330](https://github.com/nabeelio/phpvms/issues/330)
|
||||
- Refactor data seeding [\#329](https://github.com/nabeelio/phpvms/issues/329)
|
||||
- Notify/download latest version file as part of cron [\#327](https://github.com/nabeelio/phpvms/issues/327)
|
||||
- Notify if migration/updates are pending [\#326](https://github.com/nabeelio/phpvms/issues/326)
|
||||
- PIREP ID change [\#318](https://github.com/nabeelio/phpvms/issues/318)
|
||||
- Missing folders on install [\#316](https://github.com/nabeelio/phpvms/issues/316)
|
||||
- Pull in VMACars plugin [\#315](https://github.com/nabeelio/phpvms/issues/315)
|
||||
- Account for fuel in the finances [\#313](https://github.com/nabeelio/phpvms/issues/313)
|
||||
- Show module in the external website [\#310](https://github.com/nabeelio/phpvms/issues/310)
|
||||
- Profile picture distorted [\#309](https://github.com/nabeelio/phpvms/issues/309)
|
||||
- Implement cachable in models [\#307](https://github.com/nabeelio/phpvms/issues/307)
|
||||
- update [\#305](https://github.com/nabeelio/phpvms/issues/305)
|
||||
- Error with installer - Permission denied [\#298](https://github.com/nabeelio/phpvms/issues/298)
|
||||
- No Staff Groups/ Authorised Permissions [\#296](https://github.com/nabeelio/phpvms/issues/296)
|
||||
- .css and .js 404 [\#294](https://github.com/nabeelio/phpvms/issues/294)
|
||||
- Error on Install [\#292](https://github.com/nabeelio/phpvms/issues/292)
|
||||
- Ability to change interval of cron jobs [\#289](https://github.com/nabeelio/phpvms/issues/289)
|
||||
- ACARS api add response [\#287](https://github.com/nabeelio/phpvms/issues/287)
|
||||
- No bids returned in json [\#286](https://github.com/nabeelio/phpvms/issues/286)
|
||||
- Importing \*.csv with special characters [\#282](https://github.com/nabeelio/phpvms/issues/282)
|
||||
- laravel-theme doesn't seem to be respecting the theme.json extends [\#279](https://github.com/nabeelio/phpvms/issues/279)
|
||||
- Flight for current location not being restricted [\#263](https://github.com/nabeelio/phpvms/issues/263)
|
||||
- Self diagnosis [\#253](https://github.com/nabeelio/phpvms/issues/253)
|
||||
- Add /api/pireps/validate endpoint [\#247](https://github.com/nabeelio/phpvms/issues/247)
|
||||
- Cosmetic issues [\#245](https://github.com/nabeelio/phpvms/issues/245)
|
||||
- GDPR Compliance [\#244](https://github.com/nabeelio/phpvms/issues/244)
|
||||
- Read all settings into the page session [\#243](https://github.com/nabeelio/phpvms/issues/243)
|
||||
- Open Airspace [\#241](https://github.com/nabeelio/phpvms/issues/241)
|
||||
- Option to cancel PIREP [\#238](https://github.com/nabeelio/phpvms/issues/238)
|
||||
- Navdata sources [\#231](https://github.com/nabeelio/phpvms/issues/231)
|
||||
- Refactor export, use streamed response [\#227](https://github.com/nabeelio/phpvms/issues/227)
|
||||
- Add expense multiplier to subfleet [\#206](https://github.com/nabeelio/phpvms/issues/206)
|
||||
- Expenses [\#136](https://github.com/nabeelio/phpvms/issues/136)
|
||||
- Finances [\#130](https://github.com/nabeelio/phpvms/issues/130)
|
||||
- phpVMS Classic Importer [\#114](https://github.com/nabeelio/phpvms/issues/114)
|
||||
- Setup cron tasks [\#95](https://github.com/nabeelio/phpvms/issues/95)
|
||||
- Warning in admin if Installer module is still present [\#77](https://github.com/nabeelio/phpvms/issues/77)
|
||||
- flight planning [\#60](https://github.com/nabeelio/phpvms/issues/60)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Merge 7.0.0-beta.2 to master [\#440](https://github.com/nabeelio/phpvms/pull/440)
|
||||
- Refactor the upgrade pending check to see if there are settings/permi… [\#438](https://github.com/nabeelio/phpvms/pull/438)
|
||||
- Fixes [\#435](https://github.com/nabeelio/phpvms/pull/435)
|
||||
- \#406 Refactor bids [\#432](https://github.com/nabeelio/phpvms/pull/432)
|
||||
- fixes for issue \#419 [\#429](https://github.com/nabeelio/phpvms/pull/429)
|
||||
- Wrap values in travis env [\#426](https://github.com/nabeelio/phpvms/pull/426)
|
||||
- Show a message about setting up the cron and if there was an error ru… [\#425](https://github.com/nabeelio/phpvms/pull/425)
|
||||
- 359 Select theme in settings [\#423](https://github.com/nabeelio/phpvms/pull/423)
|
||||
- Fix blank aircraft field causing error closes \#414 [\#422](https://github.com/nabeelio/phpvms/pull/422)
|
||||
- Bundle CSS changes [\#421](https://github.com/nabeelio/phpvms/pull/421)
|
||||
- Some minor CSS fixes as discussed on Discord [\#420](https://github.com/nabeelio/phpvms/pull/420)
|
||||
- Move telemetry option into settings; checkbox in install refs \#415 [\#416](https://github.com/nabeelio/phpvms/pull/416)
|
||||
- Issue fixes [\#413](https://github.com/nabeelio/phpvms/pull/413)
|
||||
- Catch error messages in notifying [\#403](https://github.com/nabeelio/phpvms/pull/403)
|
||||
- Design and file upload issues [\#399](https://github.com/nabeelio/phpvms/pull/399)
|
||||
- Don't allow cancels from certain states [\#396](https://github.com/nabeelio/phpvms/pull/396)
|
||||
- Fix map checkout call [\#394](https://github.com/nabeelio/phpvms/pull/394)
|
||||
- 389 API Changes [\#393](https://github.com/nabeelio/phpvms/pull/393)
|
||||
- CSS Libraries and style updates [\#388](https://github.com/nabeelio/phpvms/pull/388)
|
||||
- 384 Laravel 6 changes [\#385](https://github.com/nabeelio/phpvms/pull/385)
|
||||
- 380 vacentral library [\#381](https://github.com/nabeelio/phpvms/pull/381)
|
||||
- Use Notification/Notifiable [\#379](https://github.com/nabeelio/phpvms/pull/379)
|
||||
- Add maintenance section to admin, clear caches \#376 [\#377](https://github.com/nabeelio/phpvms/pull/377)
|
||||
- Refactor all JS API calls \#360 [\#375](https://github.com/nabeelio/phpvms/pull/375)
|
||||
- Set the baseURL for ajax requests [\#373](https://github.com/nabeelio/phpvms/pull/373)
|
||||
- Move airline transaction code into service layer [\#371](https://github.com/nabeelio/phpvms/pull/371)
|
||||
- 229 url for downloads [\#369](https://github.com/nabeelio/phpvms/pull/369)
|
||||
- \#355 Calculate distance button [\#366](https://github.com/nabeelio/phpvms/pull/366)
|
||||
- Add Contract interface for airport lookup functionality [\#365](https://github.com/nabeelio/phpvms/pull/365)
|
||||
- Refactor error handling internally to follow RFC7807 [\#362](https://github.com/nabeelio/phpvms/pull/362)
|
||||
- Additional logging for the stats recalculation [\#358](https://github.com/nabeelio/phpvms/pull/358)
|
||||
- Add missing expiry time for PIREP API [\#356](https://github.com/nabeelio/phpvms/pull/356)
|
||||
- Fix/metar reading [\#354](https://github.com/nabeelio/phpvms/pull/354)
|
||||
- Fix/metar reading [\#353](https://github.com/nabeelio/phpvms/pull/353)
|
||||
- Add setting to include transfer hours in calculations [\#350](https://github.com/nabeelio/phpvms/pull/350)
|
||||
- Remove ext-cal from requirements list [\#349](https://github.com/nabeelio/phpvms/pull/349)
|
||||
- Multiple ticket crash fixes [\#347](https://github.com/nabeelio/phpvms/pull/347)
|
||||
- Issue/327 versioning [\#345](https://github.com/nabeelio/phpvms/pull/345)
|
||||
- Update issue templates [\#344](https://github.com/nabeelio/phpvms/pull/344)
|
||||
- Add step fields to enable decimal points on fields \#342 [\#343](https://github.com/nabeelio/phpvms/pull/343)
|
||||
- Issue fixes [\#341](https://github.com/nabeelio/phpvms/pull/341)
|
||||
- Issue/329 refactor seeding [\#337](https://github.com/nabeelio/phpvms/pull/337)
|
||||
- Fix issue where user stats aren't incremented on PIREP auto accept [\#335](https://github.com/nabeelio/phpvms/pull/335)
|
||||
- Account for fuel in the finance calculations \#313 [\#331](https://github.com/nabeelio/phpvms/pull/331)
|
||||
- Middleware to detect is update is pending; move Routes into HTTP [\#328](https://github.com/nabeelio/phpvms/pull/328)
|
||||
- Change exporter to use utf-8 close \#282 [\#325](https://github.com/nabeelio/phpvms/pull/325)
|
||||
- Rename Interfaces to Contracts to better match Laravel conventions [\#323](https://github.com/nabeelio/phpvms/pull/323)
|
||||
- Cleanup SI Unit classes; METAR fixes [\#322](https://github.com/nabeelio/phpvms/pull/322)
|
||||
- Bump lodash from 4.17.11 to 4.17.13 [\#321](https://github.com/nabeelio/phpvms/pull/321)
|
||||
- Update composer library versions [\#320](https://github.com/nabeelio/phpvms/pull/320)
|
||||
- Add missing folders under storage/public \#316 [\#319](https://github.com/nabeelio/phpvms/pull/319)
|
||||
- Add interface to additional roles/permissions \#296 [\#314](https://github.com/nabeelio/phpvms/pull/314)
|
||||
- Fix pax count fields; add fuel used field \#295 [\#312](https://github.com/nabeelio/phpvms/pull/312)
|
||||
- Apply fixes from StyleCI [\#311](https://github.com/nabeelio/phpvms/pull/311)
|
||||
- Laravel 5.8 Update [\#308](https://github.com/nabeelio/phpvms/pull/308)
|
||||
- Add more search criteria/dev environment via docker-compose \#297 [\#306](https://github.com/nabeelio/phpvms/pull/306)
|
||||
- Add gmp to requirements in install \#285 [\#301](https://github.com/nabeelio/phpvms/pull/301)
|
||||
- Revert "Update issue templates" [\#300](https://github.com/nabeelio/phpvms/pull/300)
|
||||
- Update issue templates [\#299](https://github.com/nabeelio/phpvms/pull/299)
|
||||
|
||||
## [v7.0.0-beta](https://github.com/nabeelio/phpvms/tree/v7.0.0-beta) (2018-10-25)
|
||||
|
||||
[Full Changelog](https://github.com/nabeelio/phpvms/compare/v7.0.0-alpha2...v7.0.0-beta)
|
||||
|
||||
**Implemented enhancements:**
|
||||
|
||||
- Follow flight checkbox on live map [\#246](https://github.com/nabeelio/phpvms/issues/246)
|
||||
- PIREP restrictions based on settings [\#221](https://github.com/nabeelio/phpvms/issues/221)
|
||||
- Save PIREP as draft [\#220](https://github.com/nabeelio/phpvms/issues/220)
|
||||
- Shorten fields on flights table [\#205](https://github.com/nabeelio/phpvms/issues/205)
|
||||
- Show bids in profile [\#203](https://github.com/nabeelio/phpvms/issues/203)
|
||||
- Don't change rank if current rank is higher than the one found [\#196](https://github.com/nabeelio/phpvms/issues/196)
|
||||
- pagination sizes [\#162](https://github.com/nabeelio/phpvms/issues/162)
|
||||
- Allow overriding templates [\#161](https://github.com/nabeelio/phpvms/issues/161)
|
||||
- Replace old pjax library with newer one [\#133](https://github.com/nabeelio/phpvms/issues/133)
|
||||
- Awards [\#113](https://github.com/nabeelio/phpvms/issues/113)
|
||||
- Setting to restrict airport selection to hubs [\#104](https://github.com/nabeelio/phpvms/issues/104)
|
||||
- Pilot leave status [\#96](https://github.com/nabeelio/phpvms/issues/96)
|
||||
- schedule import [\#15](https://github.com/nabeelio/phpvms/issues/15)
|
||||
|
||||
**Fixed bugs:**
|
||||
|
||||
- Error saving PIREP [\#252](https://github.com/nabeelio/phpvms/issues/252)
|
||||
- Updater with modules not working [\#249](https://github.com/nabeelio/phpvms/issues/249)
|
||||
- User registration country and timezone not saving [\#223](https://github.com/nabeelio/phpvms/issues/223)
|
||||
- Importer inserts invalid data on empty columns/rows [\#222](https://github.com/nabeelio/phpvms/issues/222)
|
||||
- Import/export - missing fields [\#219](https://github.com/nabeelio/phpvms/issues/219)
|
||||
- Country flag not showing on user list [\#218](https://github.com/nabeelio/phpvms/issues/218)
|
||||
- fares/subfleet unique field blocks saving [\#214](https://github.com/nabeelio/phpvms/issues/214)
|
||||
- module navigation not working \(admin\) [\#201](https://github.com/nabeelio/phpvms/issues/201)
|
||||
- Bid not removed when pirep if filled [\#200](https://github.com/nabeelio/phpvms/issues/200)
|
||||
- Not saving Flight Time [\#199](https://github.com/nabeelio/phpvms/issues/199)
|
||||
|
||||
**Closed issues:**
|
||||
|
||||
- SettingsController/Repo are saving as "on" instead of 1/true [\#272](https://github.com/nabeelio/phpvms/issues/272)
|
||||
- Auto Accept New Pilot isn't working [\#269](https://github.com/nabeelio/phpvms/issues/269)
|
||||
- Suggestion: button to copy aircraft [\#267](https://github.com/nabeelio/phpvms/issues/267)
|
||||
- Combine aircraft and subfleet import/export into one [\#256](https://github.com/nabeelio/phpvms/issues/256)
|
||||
- cron - recalculate hours [\#254](https://github.com/nabeelio/phpvms/issues/254)
|
||||
- Install Directory is missing from git repo [\#251](https://github.com/nabeelio/phpvms/issues/251)
|
||||
- Warning: require\(C:\xampp\Virtual Airline Website\bootstrap/../vendor/autoload.php\): failed to open stream: No such file or directory in C:\xampp\Virtual Airline Website\bootstrap\autoload.php on line 17 [\#248](https://github.com/nabeelio/phpvms/issues/248)
|
||||
- Settings [\#239](https://github.com/nabeelio/phpvms/issues/239)
|
||||
- HTTP caching [\#237](https://github.com/nabeelio/phpvms/issues/237)
|
||||
- Module artisan command bug [\#234](https://github.com/nabeelio/phpvms/issues/234)
|
||||
- Add /api/news [\#232](https://github.com/nabeelio/phpvms/issues/232)
|
||||
- Start date/end date, along with day of week options [\#230](https://github.com/nabeelio/phpvms/issues/230)
|
||||
- Replace weather lookup [\#228](https://github.com/nabeelio/phpvms/issues/228)
|
||||
- File/avatar uploads [\#226](https://github.com/nabeelio/phpvms/issues/226)
|
||||
- Change fleet page to load subfleets first [\#217](https://github.com/nabeelio/phpvms/issues/217)
|
||||
- Add sort options [\#216](https://github.com/nabeelio/phpvms/issues/216)
|
||||
- Auto loader on Line 17 [\#215](https://github.com/nabeelio/phpvms/issues/215)
|
||||
- Add flight fields [\#213](https://github.com/nabeelio/phpvms/issues/213)
|
||||
- Recaptcha in registration [\#212](https://github.com/nabeelio/phpvms/issues/212)
|
||||
- Browser tests [\#211](https://github.com/nabeelio/phpvms/issues/211)
|
||||
- Axios HTTP library [\#210](https://github.com/nabeelio/phpvms/issues/210)
|
||||
- Replace skinning with laravel-theme [\#209](https://github.com/nabeelio/phpvms/issues/209)
|
||||
- Refactor getting expenses in FinanceData [\#208](https://github.com/nabeelio/phpvms/issues/208)
|
||||
- Change all money to hold in cents, not dollars [\#204](https://github.com/nabeelio/phpvms/issues/204)
|
||||
- Pilot pay - rank base and subfleet multiplier [\#197](https://github.com/nabeelio/phpvms/issues/197)
|
||||
- Flight schedule importer/exporter [\#194](https://github.com/nabeelio/phpvms/issues/194)
|
||||
- use find/replace in bootstrapWith\(\) call [\#163](https://github.com/nabeelio/phpvms/issues/163)
|
||||
- Awards [\#155](https://github.com/nabeelio/phpvms/issues/155)
|
||||
- System Changes/Additions [\#135](https://github.com/nabeelio/phpvms/issues/135)
|
||||
- Airport & Aircraft Changes [\#134](https://github.com/nabeelio/phpvms/issues/134)
|
||||
- Handle flight specific fares & multipliers [\#125](https://github.com/nabeelio/phpvms/issues/125)
|
||||
- Flight set day of week [\#122](https://github.com/nabeelio/phpvms/issues/122)
|
||||
- Airport page [\#85](https://github.com/nabeelio/phpvms/issues/85)
|
||||
- Bulk upload charts to airport [\#84](https://github.com/nabeelio/phpvms/issues/84)
|
||||
- Pull some values from existing .env file [\#79](https://github.com/nabeelio/phpvms/issues/79)
|
||||
- METAR Information [\#61](https://github.com/nabeelio/phpvms/issues/61)
|
||||
- flights page [\#57](https://github.com/nabeelio/phpvms/issues/57)
|
||||
- fuel costs to airports and fuel type on subfleet [\#41](https://github.com/nabeelio/phpvms/issues/41)
|
||||
- generate aircraft hex code on create [\#33](https://github.com/nabeelio/phpvms/issues/33)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- More acceptable translation to opt-in \(es\) [\#284](https://github.com/nabeelio/phpvms/pull/284)
|
||||
- Fix 404s to requirements/setup in README.md [\#283](https://github.com/nabeelio/phpvms/pull/283)
|
||||
- Hide expired live flight from live map and remove from DB [\#280](https://github.com/nabeelio/phpvms/pull/280)
|
||||
- \[WIP\] Laravel 5.7 Update [\#278](https://github.com/nabeelio/phpvms/pull/278)
|
||||
- Make admin input outline darker [\#276](https://github.com/nabeelio/phpvms/pull/276)
|
||||
- capture & display pilot transfer hours [\#275](https://github.com/nabeelio/phpvms/pull/275)
|
||||
- Optimize query with eager loading [\#274](https://github.com/nabeelio/phpvms/pull/274)
|
||||
- Fix SettingsController saving boolean value as 'on' [\#273](https://github.com/nabeelio/phpvms/pull/273)
|
||||
- Hide inactive pilot from pilot list page [\#271](https://github.com/nabeelio/phpvms/pull/271)
|
||||
- Fix flight search restriction [\#270](https://github.com/nabeelio/phpvms/pull/270)
|
||||
- Apply fixes from StyleCI [\#268](https://github.com/nabeelio/phpvms/pull/268)
|
||||
- Fix METAR issue [\#264](https://github.com/nabeelio/phpvms/pull/264)
|
||||
- Apply fixes from StyleCI [\#262](https://github.com/nabeelio/phpvms/pull/262)
|
||||
- Apply fixes from StyleCI [\#261](https://github.com/nabeelio/phpvms/pull/261)
|
||||
- Enable eager loading [\#259](https://github.com/nabeelio/phpvms/pull/259)
|
||||
- Implement cron to remove expired bids [\#258](https://github.com/nabeelio/phpvms/pull/258)
|
||||
- Fix timezone list HTML Escaped [\#257](https://github.com/nabeelio/phpvms/pull/257)
|
||||
- Update 07/13/2018 es-translations [\#255](https://github.com/nabeelio/phpvms/pull/255)
|
||||
- ES translation [\#250](https://github.com/nabeelio/phpvms/pull/250)
|
||||
- flights filtered per va [\#242](https://github.com/nabeelio/phpvms/pull/242)
|
||||
- Avatar Issue [\#236](https://github.com/nabeelio/phpvms/pull/236)
|
||||
- Install bug [\#235](https://github.com/nabeelio/phpvms/pull/235)
|
||||
|
||||
## [v7.0.0-alpha2](https://github.com/nabeelio/phpvms/tree/v7.0.0-alpha2) (2018-02-23)
|
||||
|
||||
[Full Changelog](https://github.com/nabeelio/phpvms/compare/v7.0.0-alpha1...v7.0.0-alpha2)
|
||||
|
||||
**Implemented enhancements:**
|
||||
|
||||
- Get user PIREPs [\#192](https://github.com/nabeelio/phpvms/issues/192)
|
||||
- Use time conversion class [\#190](https://github.com/nabeelio/phpvms/issues/190)
|
||||
- Require inputs in Imperial units [\#189](https://github.com/nabeelio/phpvms/issues/189)
|
||||
- Make planned\_distance in prefile optional [\#185](https://github.com/nabeelio/phpvms/issues/185)
|
||||
- If there's no /pirep/route calls, when it's filed, write the route [\#184](https://github.com/nabeelio/phpvms/issues/184)
|
||||
- Create a /api/flight/{id}/route call [\#183](https://github.com/nabeelio/phpvms/issues/183)
|
||||
- Make all APIs behind auth [\#173](https://github.com/nabeelio/phpvms/issues/173)
|
||||
- Add bid [\#172](https://github.com/nabeelio/phpvms/issues/172)
|
||||
- Setting for only showing aircraft that are at the departure airport [\#171](https://github.com/nabeelio/phpvms/issues/171)
|
||||
- Font for input [\#169](https://github.com/nabeelio/phpvms/issues/169)
|
||||
- Read default value from settings table [\#106](https://github.com/nabeelio/phpvms/issues/106)
|
||||
|
||||
**Fixed bugs:**
|
||||
|
||||
- Volume units to lbs/kg, not gal/liter [\#193](https://github.com/nabeelio/phpvms/issues/193)
|
||||
- Add country to airline missing [\#191](https://github.com/nabeelio/phpvms/issues/191)
|
||||
- SKIN\_NAME missing on error pages [\#187](https://github.com/nabeelio/phpvms/issues/187)
|
||||
- Airport timezone not being saved [\#182](https://github.com/nabeelio/phpvms/issues/182)
|
||||
- Rank checkboxes not being saved [\#181](https://github.com/nabeelio/phpvms/issues/181)
|
||||
- Make sure cancelled PIREPs don't show [\#180](https://github.com/nabeelio/phpvms/issues/180)
|
||||
- Ignore cancelled PIREPs in duplicate check [\#179](https://github.com/nabeelio/phpvms/issues/179)
|
||||
- Make sure all fields are returned in PIREP object [\#178](https://github.com/nabeelio/phpvms/issues/178)
|
||||
- autopopulate SOURCE field in ACARS [\#177](https://github.com/nabeelio/phpvms/issues/177)
|
||||
- Make sure pireps.restrict\_aircraft\_to\_rank is respected [\#170](https://github.com/nabeelio/phpvms/issues/170)
|
||||
- Don't change rank if current rank is non-auto promoting [\#168](https://github.com/nabeelio/phpvms/issues/168)
|
||||
- PIREP hours can't be changed [\#167](https://github.com/nabeelio/phpvms/issues/167)
|
||||
- Changing a flight status does not save [\#150](https://github.com/nabeelio/phpvms/issues/150)
|
||||
- Additional PIREP fields don't save correctly [\#146](https://github.com/nabeelio/phpvms/issues/146)
|
||||
|
||||
**Closed issues:**
|
||||
|
||||
- Cleanup icons [\#195](https://github.com/nabeelio/phpvms/issues/195)
|
||||
- remove raw\_data field from pirep table [\#188](https://github.com/nabeelio/phpvms/issues/188)
|
||||
- Remove Resource::withoutWrapping\(\) to follow jsonapi spec [\#186](https://github.com/nabeelio/phpvms/issues/186)
|
||||
- Add an `artisan phpvms:dev-install` command [\#176](https://github.com/nabeelio/phpvms/issues/176)
|
||||
- Pagination settings [\#175](https://github.com/nabeelio/phpvms/issues/175)
|
||||
- Implement setting for flights at pilot's current airport [\#174](https://github.com/nabeelio/phpvms/issues/174)
|
||||
- Minimum PHP supported version to 7.1 [\#166](https://github.com/nabeelio/phpvms/issues/166)
|
||||
- Update to Laravel 5.6 [\#165](https://github.com/nabeelio/phpvms/issues/165)
|
||||
- Updater [\#164](https://github.com/nabeelio/phpvms/issues/164)
|
||||
- Allow adding rank in subfleet page [\#160](https://github.com/nabeelio/phpvms/issues/160)
|
||||
- Docs [\#153](https://github.com/nabeelio/phpvms/issues/153)
|
||||
|
||||
## [v7.0.0-alpha1](https://github.com/nabeelio/phpvms/tree/v7.0.0-alpha1) (2018-02-04)
|
||||
|
||||
[Full Changelog](https://github.com/nabeelio/phpvms/compare/f158c11dea7c0a4af27c93382333b67fdc531e3a...v7.0.0-alpha1)
|
||||
|
||||
**Implemented enhancements:**
|
||||
|
||||
- Widgetized components [\#127](https://github.com/nabeelio/phpvms/issues/127)
|
||||
- Set aircraft location on landing [\#112](https://github.com/nabeelio/phpvms/issues/112)
|
||||
- save user IP on login [\#110](https://github.com/nabeelio/phpvms/issues/110)
|
||||
- When rejecting PIREP, add a comment/reason [\#107](https://github.com/nabeelio/phpvms/issues/107)
|
||||
- Check for duplicate PIREPs and add setting [\#105](https://github.com/nabeelio/phpvms/issues/105)
|
||||
- create vendor.js with webpack [\#91](https://github.com/nabeelio/phpvms/issues/91)
|
||||
- move from bower to webpack [\#90](https://github.com/nabeelio/phpvms/issues/90)
|
||||
- Pilots list and profile [\#82](https://github.com/nabeelio/phpvms/issues/82)
|
||||
- pirep auto-accept for certain rankings [\#24](https://github.com/nabeelio/phpvms/issues/24)
|
||||
- Investigate removing the Repository pattern to simplify [\#6](https://github.com/nabeelio/phpvms/issues/6)
|
||||
|
||||
**Fixed bugs:**
|
||||
|
||||
- Error when sending /api/pireps/prefile [\#149](https://github.com/nabeelio/phpvms/issues/149)
|
||||
- Extra numbers on flights page [\#148](https://github.com/nabeelio/phpvms/issues/148)
|
||||
- Unable to select any aircraft from fleet on file PIREP page [\#147](https://github.com/nabeelio/phpvms/issues/147)
|
||||
- Error thrown when editing a saved flight [\#145](https://github.com/nabeelio/phpvms/issues/145)
|
||||
- When you delete flight from admin, filed pirep will throw error [\#144](https://github.com/nabeelio/phpvms/issues/144)
|
||||
- Avoid calling MySQL executable for creating database [\#132](https://github.com/nabeelio/phpvms/issues/132)
|
||||
- Aircraft can be added without specifying a subfleet [\#128](https://github.com/nabeelio/phpvms/issues/128)
|
||||
- Non error flash messages not showing [\#126](https://github.com/nabeelio/phpvms/issues/126)
|
||||
- Removing subfleet from flight [\#124](https://github.com/nabeelio/phpvms/issues/124)
|
||||
- User still has API access if they're not ACTIVE [\#119](https://github.com/nabeelio/phpvms/issues/119)
|
||||
- Delete bids when flight is deleted [\#103](https://github.com/nabeelio/phpvms/issues/103)
|
||||
- JSON error messages [\#92](https://github.com/nabeelio/phpvms/issues/92)
|
||||
- add subfleet to flight broken [\#88](https://github.com/nabeelio/phpvms/issues/88)
|
||||
- logout functionality not working from frontpage [\#26](https://github.com/nabeelio/phpvms/issues/26)
|
||||
|
||||
**Closed issues:**
|
||||
|
||||
- `fuel\_used` in pirep/file [\#159](https://github.com/nabeelio/phpvms/issues/159)
|
||||
- Add additional fields for PIREP and flights [\#158](https://github.com/nabeelio/phpvms/issues/158)
|
||||
- Stub file [\#157](https://github.com/nabeelio/phpvms/issues/157)
|
||||
- Add config.php in root on install [\#156](https://github.com/nabeelio/phpvms/issues/156)
|
||||
- New registrations are auto-accepted and put as active [\#151](https://github.com/nabeelio/phpvms/issues/151)
|
||||
- new version alert [\#143](https://github.com/nabeelio/phpvms/issues/143)
|
||||
- Footer copyright text [\#142](https://github.com/nabeelio/phpvms/issues/142)
|
||||
- Version build number to use string/assigned date [\#141](https://github.com/nabeelio/phpvms/issues/141)
|
||||
- Handle duplicate flight number [\#139](https://github.com/nabeelio/phpvms/issues/139)
|
||||
- Restrict shown aircraft to user's rank [\#138](https://github.com/nabeelio/phpvms/issues/138)
|
||||
- Docs [\#137](https://github.com/nabeelio/phpvms/issues/137)
|
||||
- Checksum for tarball [\#123](https://github.com/nabeelio/phpvms/issues/123)
|
||||
- API Items need [\#120](https://github.com/nabeelio/phpvms/issues/120)
|
||||
- ACARS API [\#118](https://github.com/nabeelio/phpvms/issues/118)
|
||||
- List of cron jobs required [\#117](https://github.com/nabeelio/phpvms/issues/117)
|
||||
- Add create/edit fields for columns [\#111](https://github.com/nabeelio/phpvms/issues/111)
|
||||
- Add PIREP cancel endpoint and cleanup job [\#109](https://github.com/nabeelio/phpvms/issues/109)
|
||||
- ACARS table should save the route [\#102](https://github.com/nabeelio/phpvms/issues/102)
|
||||
- /api/fleet and /api/user/fleet [\#101](https://github.com/nabeelio/phpvms/issues/101)
|
||||
- Assign subfleets to ranks [\#100](https://github.com/nabeelio/phpvms/issues/100)
|
||||
- show dates/times in proper timezone [\#97](https://github.com/nabeelio/phpvms/issues/97)
|
||||
- editable fields not working [\#94](https://github.com/nabeelio/phpvms/issues/94)
|
||||
- Settings page needs to be completed [\#93](https://github.com/nabeelio/phpvms/issues/93)
|
||||
- Airport page pagination & search [\#87](https://github.com/nabeelio/phpvms/issues/87)
|
||||
- Mark airport as hub [\#86](https://github.com/nabeelio/phpvms/issues/86)
|
||||
- Terms and Conditions & COPPA during registration [\#81](https://github.com/nabeelio/phpvms/issues/81)
|
||||
- Look at alternative to Entrust [\#78](https://github.com/nabeelio/phpvms/issues/78)
|
||||
- Check if .env file exists in installer [\#76](https://github.com/nabeelio/phpvms/issues/76)
|
||||
- upload travis artifact to phpvms ftp as "latest.zip" [\#75](https://github.com/nabeelio/phpvms/issues/75)
|
||||
- Track hours on airframes [\#73](https://github.com/nabeelio/phpvms/issues/73)
|
||||
- PIREP accept/reject in admin should call PIREP service [\#72](https://github.com/nabeelio/phpvms/issues/72)
|
||||
- Error with MySQL syntax when creating database. [\#71](https://github.com/nabeelio/phpvms/issues/71)
|
||||
- pirep comments [\#70](https://github.com/nabeelio/phpvms/issues/70)
|
||||
- findWithoutFail Method does not exist [\#69](https://github.com/nabeelio/phpvms/issues/69)
|
||||
- Commit error 403 [\#67](https://github.com/nabeelio/phpvms/issues/67)
|
||||
- Keep Showing 404.... [\#66](https://github.com/nabeelio/phpvms/issues/66)
|
||||
- wrap migrate command [\#65](https://github.com/nabeelio/phpvms/issues/65)
|
||||
- Create 404 page [\#63](https://github.com/nabeelio/phpvms/issues/63)
|
||||
- link to admin in nav if you have permissions [\#62](https://github.com/nabeelio/phpvms/issues/62)
|
||||
- Error while creating database [\#56](https://github.com/nabeelio/phpvms/issues/56)
|
||||
- shared hosting stuff [\#55](https://github.com/nabeelio/phpvms/issues/55)
|
||||
- gravatar url for profile [\#54](https://github.com/nabeelio/phpvms/issues/54)
|
||||
- news and notams module [\#52](https://github.com/nabeelio/phpvms/issues/52)
|
||||
- try atoum vs phpunit [\#51](https://github.com/nabeelio/phpvms/issues/51)
|
||||
- Cache Airports calls [\#49](https://github.com/nabeelio/phpvms/issues/49)
|
||||
- add custom fields table for flights [\#48](https://github.com/nabeelio/phpvms/issues/48)
|
||||
- Events system [\#43](https://github.com/nabeelio/phpvms/issues/43)
|
||||
- add fuel costs types to the airports table [\#40](https://github.com/nabeelio/phpvms/issues/40)
|
||||
- adjust "created" date for airline [\#39](https://github.com/nabeelio/phpvms/issues/39)
|
||||
- add gross\_weight to PIREPs [\#38](https://github.com/nabeelio/phpvms/issues/38)
|
||||
- subfleet to flight pivot values [\#37](https://github.com/nabeelio/phpvms/issues/37)
|
||||
- API authentication/middleware [\#36](https://github.com/nabeelio/phpvms/issues/36)
|
||||
- REST API [\#35](https://github.com/nabeelio/phpvms/issues/35)
|
||||
- use uuids on a few tables [\#34](https://github.com/nabeelio/phpvms/issues/34)
|
||||
- subfleet \(ranks, expenses\) [\#32](https://github.com/nabeelio/phpvms/issues/32)
|
||||
- How to install this? [\#31](https://github.com/nabeelio/phpvms/issues/31)
|
||||
- experiment with changing PDO mode [\#30](https://github.com/nabeelio/phpvms/issues/30)
|
||||
- forgot password [\#27](https://github.com/nabeelio/phpvms/issues/27)
|
||||
- rankings [\#23](https://github.com/nabeelio/phpvms/issues/23)
|
||||
- module system [\#22](https://github.com/nabeelio/phpvms/issues/22)
|
||||
- pireps [\#21](https://github.com/nabeelio/phpvms/issues/21)
|
||||
- admin user management [\#20](https://github.com/nabeelio/phpvms/issues/20)
|
||||
- modify DatabaseSeeder to look at env [\#19](https://github.com/nabeelio/phpvms/issues/19)
|
||||
- look at flarum method of install [\#18](https://github.com/nabeelio/phpvms/issues/18)
|
||||
- navdata ingestion [\#17](https://github.com/nabeelio/phpvms/issues/17)
|
||||
- settings panel [\#16](https://github.com/nabeelio/phpvms/issues/16)
|
||||
- routing and scheduling [\#14](https://github.com/nabeelio/phpvms/issues/14)
|
||||
- airport details page [\#13](https://github.com/nabeelio/phpvms/issues/13)
|
||||
- currency format config [\#12](https://github.com/nabeelio/phpvms/issues/12)
|
||||
- aircraft details page [\#11](https://github.com/nabeelio/phpvms/issues/11)
|
||||
- user dashboard and profile pages [\#10](https://github.com/nabeelio/phpvms/issues/10)
|
||||
- admin panel work [\#9](https://github.com/nabeelio/phpvms/issues/9)
|
||||
- theme/skins engine [\#8](https://github.com/nabeelio/phpvms/issues/8)
|
||||
- Integrate roles and permissions [\#7](https://github.com/nabeelio/phpvms/issues/7)
|
||||
- rebuild tables [\#5](https://github.com/nabeelio/phpvms/issues/5)
|
||||
- front-end template [\#4](https://github.com/nabeelio/phpvms/issues/4)
|
||||
- Laravel 5.4 [\#3](https://github.com/nabeelio/phpvms/issues/3)
|
||||
- look up role-based permissions [\#2](https://github.com/nabeelio/phpvms/issues/2)
|
||||
- installer [\#1](https://github.com/nabeelio/phpvms/issues/1)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Fixed a few field entries [\#116](https://github.com/nabeelio/phpvms/pull/116)
|
||||
- Remove unique email entry [\#115](https://github.com/nabeelio/phpvms/pull/115)
|
||||
|
||||
|
||||
|
||||
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
|
||||
|
||||
8
Makefile
8
Makefile
@@ -43,7 +43,7 @@ build:
|
||||
# This is to build all the stylesheets, etc
|
||||
.PHONY: build-assets
|
||||
build-assets:
|
||||
yarn run production
|
||||
npm run production
|
||||
|
||||
.PHONY: install
|
||||
install: build
|
||||
@@ -75,12 +75,12 @@ tests: test
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
#php artisan database:create --reset
|
||||
vendor/bin/phpunit --debug --verbose
|
||||
@#php artisan database:create --reset
|
||||
@vendor/bin/phpunit --verbose
|
||||
|
||||
.PHONY: phpcs
|
||||
phpcs:
|
||||
@vendor/bin/php-cs-fixer fix --config=.php_cs -v --diff --dry-run
|
||||
@vendor/bin/php-cs-fixer fix --config=.php_cs -v --diff --diff-format=udiff --dry-run
|
||||
|
||||
#.PHONY: phpstan
|
||||
#phpstan:
|
||||
|
||||
27
README.md
27
README.md
@@ -1,20 +1,17 @@
|
||||
# phpvms <sup>7</sup>
|
||||
# phpVMS <sup>7</sup>
|
||||
|
||||
[](https://travis-ci.org/nabeelio/phpvms) [](https://www.codacy.com/app/nabeelio/phpvms?utm_source=github.com&utm_medium=referral&utm_content=nabeelio/phpvms&utm_campaign=Badge_Grade) [](https://packagist.org/packages/nabeel/phpvms)  [](https://packagist.org/packages/nabeel/phpvms)
|
||||
[](https://github.com/nabeelio/phpvms/actions) [](https://www.codacy.com/app/nabeelio/phpvms?utm_source=github.com&utm_medium=referral&utm_content=nabeelio/phpvms&utm_campaign=Badge_Grade) [](https://packagist.org/packages/nabeel/phpvms)  [](https://packagist.org/packages/nabeel/phpvms)
|
||||
|
||||
The next phpvms version built on the laravel framework. work in progress. The latest documentation, with installation instructions is available
|
||||
[on the phpVMS documentation](http://docs.phpvms.net/) page.
|
||||
The next phpvms version built on the laravel framework. work in progress. The latest documentation, with installation instructions is available [on the phpVMS documentation](https://docs.phpvms.net/) page.
|
||||
|
||||
# installation
|
||||
## Installation
|
||||
|
||||
A full distribution, with all of the composer dependencies, is available at this
|
||||
[GitHub Releases](https://github.com/nabeelio/phpvms/releases) link.
|
||||
|
||||
### Requirements
|
||||
|
||||
|
||||
## Requirements
|
||||
|
||||
- PHP 7.1+, extensions:
|
||||
- PHP 7.3+, extensions:
|
||||
- cURL
|
||||
- JSON
|
||||
- mbstring
|
||||
@@ -24,22 +21,22 @@ A full distribution, with all of the composer dependencies, is available at this
|
||||
- Database:
|
||||
- MySQL 5.5+ (or MySQL variant, including MariaDB and Percona)
|
||||
|
||||
[View more details on requirements](http://docs.phpvms.net/setup/requirements)
|
||||
[View more details on requirements](https://docs.phpvms.net/requirements)
|
||||
|
||||
## Installer
|
||||
### Installer
|
||||
|
||||
1. Upload to your server
|
||||
1. Visit the site, and follow the link to the installer
|
||||
|
||||
[View installation details](http://docs.phpvms.net/setup/installation)
|
||||
[View installation details](https://docs.phpvms.net/installation/installation)
|
||||
|
||||
# development environment
|
||||
## Development Environment
|
||||
|
||||
A full development environment can be brought up using Docker:
|
||||
|
||||
```bash
|
||||
composer install
|
||||
yarn install
|
||||
npm install
|
||||
docker-compose build
|
||||
docker-compose up
|
||||
```
|
||||
@@ -50,7 +47,7 @@ Then go to `http://localhost`. If you're using dnsmasq, the `app` container is l
|
||||
127.0.0.1 phpvms.test
|
||||
```
|
||||
|
||||
## Building JS/CSS assets
|
||||
### Building JS/CSS assets
|
||||
|
||||
Yarn is required, run:
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Contracts\Command;
|
||||
use App\Facades\Utils;
|
||||
use App\Support\Units\Time;
|
||||
use GuzzleHttp\Client;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
|
||||
@@ -64,7 +64,7 @@ class AcarsReplay extends Command
|
||||
protected function startPirep($flight): string
|
||||
{
|
||||
// convert the planned flight time to be completely in minutes
|
||||
$pft = Utils::hoursToMinutes(
|
||||
$pft = Time::hoursToMinutes(
|
||||
$flight->planned_hrsenroute,
|
||||
$flight->planned_minenroute
|
||||
);
|
||||
|
||||
41
app/Console/Commands/ClearCaches.php
Normal file
41
app/Console/Commands/ClearCaches.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Contracts\Command;
|
||||
use Nwidart\Modules\Facades\Module;
|
||||
|
||||
class ClearCaches extends Command
|
||||
{
|
||||
protected $signature = 'phpvms:caches';
|
||||
protected $description = 'Clear all caches';
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
self::clearCaches();
|
||||
}
|
||||
|
||||
public static function clearCaches()
|
||||
{
|
||||
self::clearBootstrapCache();
|
||||
self::clearModuleCache();
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear the bootstrap/cache dir
|
||||
*/
|
||||
private static function clearBootstrapCache()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Rescan for new modules
|
||||
*/
|
||||
private static function clearModuleCache()
|
||||
{
|
||||
Module::scan();
|
||||
}
|
||||
}
|
||||
@@ -79,21 +79,29 @@ class CreateDatabase extends Command
|
||||
*/
|
||||
protected function create_sqlite($dbkey)
|
||||
{
|
||||
$dbPath = config($dbkey.'database');
|
||||
|
||||
// Skip if running in memory
|
||||
if ($dbPath === ':memory:') {
|
||||
return;
|
||||
}
|
||||
|
||||
$exec = 'sqlite3';
|
||||
if ($this->os->isWindowsLike()) {
|
||||
$exec = 'sqlite3.exe';
|
||||
}
|
||||
|
||||
if ($this->option('reset') === true) {
|
||||
$cmd = ['rm', '-rf', config($dbkey.'database')];
|
||||
$this->runCommand($cmd);
|
||||
if (file_exists($dbPath)) {
|
||||
unlink(config($dbkey.'database'));
|
||||
}
|
||||
}
|
||||
|
||||
if (!file_exists(config($dbkey.'database'))) {
|
||||
if (!file_exists($dbPath)) {
|
||||
$cmd = [
|
||||
$exec,
|
||||
config($dbkey.'database'),
|
||||
'""',
|
||||
$dbPath,
|
||||
'".exit"',
|
||||
];
|
||||
|
||||
$this->runCommand($cmd);
|
||||
|
||||
@@ -7,6 +7,7 @@ use App\Models\Acars;
|
||||
use App\Models\Airline;
|
||||
use App\Models\Pirep;
|
||||
use App\Models\User;
|
||||
use App\Notifications\Messages\UserRegistered;
|
||||
use App\Repositories\AcarsRepository;
|
||||
use App\Services\AirportService;
|
||||
use App\Services\AwardService;
|
||||
@@ -60,6 +61,7 @@ class DevCommands extends Command
|
||||
'metar' => 'getMetar',
|
||||
'recalculate-stats' => 'recalculateStats',
|
||||
'reset-install' => 'resetInstall',
|
||||
'new-user-email' => 'newUserEmail',
|
||||
'xml-to-yaml' => 'xmlToYaml',
|
||||
];
|
||||
|
||||
@@ -290,6 +292,16 @@ class DevCommands extends Command
|
||||
$this->info('Done!');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test sending a user a registered email
|
||||
*/
|
||||
protected function newUserEmail()
|
||||
{
|
||||
$user_id = $this->argument('param');
|
||||
$user = User::find($user_id);
|
||||
$user->notify(new UserRegistered($user));
|
||||
}
|
||||
|
||||
public function liveFlights(): void
|
||||
{
|
||||
$acarsRepo = app(AcarsRepository::class);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Contracts\Command;
|
||||
use Modules\Installer\Services\ConfigService;
|
||||
use App\Services\Installer\ConfigService;
|
||||
|
||||
/**
|
||||
* Create a fresh development install
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Importer\Console\Commands;
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Contracts\Command;
|
||||
use App\Services\ImporterService;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Modules\Importer\Services\ImporterService;
|
||||
|
||||
class ImportFromClassicCommand extends Command
|
||||
{
|
||||
@@ -34,7 +34,7 @@ class Version extends Command
|
||||
// If a version is being passed in, the update the build, etc data against this
|
||||
if ($this->argument('version')) {
|
||||
$version = \SemVer\SemVer\Version::fromString($this->argument('version'));
|
||||
if ($this->option('write_full_version')) {
|
||||
if ($this->option('write-full-version')) {
|
||||
$cfg['current']['major'] = $version->getMajor();
|
||||
$cfg['current']['minor'] = $version->getMinor();
|
||||
$cfg['current']['patch'] = $version->getPatch();
|
||||
@@ -51,14 +51,15 @@ class Version extends Command
|
||||
}
|
||||
|
||||
// Always write out the build ID/build number which is the commit hash
|
||||
$build_number = $this->versionSvc->getBuildId($cfg);
|
||||
$build_number = $this->versionSvc->generateBuildId($cfg);
|
||||
$cfg['current']['commit'] = $build_number;
|
||||
$cfg['build']['number'] = $build_number;
|
||||
|
||||
file_put_contents($version_file, Yaml::dump($cfg, 4, 2));
|
||||
}
|
||||
|
||||
$version = $this->versionSvc->getCurrentVersion(!$this->option('base-only'));
|
||||
$incl_build = empty($this->option('base-only')) ? true : false;
|
||||
$version = $this->versionSvc->getCurrentVersion($incl_build);
|
||||
echo $version."\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Contracts\Command;
|
||||
use DB;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Symfony\Component\Yaml\Yaml;
|
||||
|
||||
/**
|
||||
@@ -25,6 +25,20 @@ class YamlExport extends Command
|
||||
exit();
|
||||
}
|
||||
|
||||
// A "preset" for exporting the base set of data
|
||||
if ($tables[0] === 'base') {
|
||||
$tables = [
|
||||
'airlines',
|
||||
'aircraft',
|
||||
'subfleets',
|
||||
'subfleet_fare',
|
||||
'subfleet_rank',
|
||||
'bids',
|
||||
'fares',
|
||||
'flights',
|
||||
];
|
||||
}
|
||||
|
||||
$export_tables = [];
|
||||
foreach ($tables as $table) {
|
||||
$export_tables[$table] = [];
|
||||
|
||||
@@ -13,7 +13,11 @@ use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
class Kernel extends ConsoleKernel
|
||||
{
|
||||
/**
|
||||
* Define the application's command schedule.
|
||||
* Define the application's command schedule. How this works... according to the command
|
||||
* time, an event gets send out with the appropriate time (e.g, hourly sends an hourly event)
|
||||
*
|
||||
* Then the CronServiceProvider has the list of cronjobs which then run according to the events
|
||||
* and then calls those at the proper times.
|
||||
*
|
||||
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
||||
*
|
||||
@@ -27,10 +31,13 @@ class Kernel extends ConsoleKernel
|
||||
$schedule->command(Hourly::class)->hourly();
|
||||
|
||||
// When spatie-backups runs
|
||||
$schedule->command('backup:clean')->daily()->at('01:00');
|
||||
$schedule->command('backup:run')->daily()->at('02:00');
|
||||
/*if (config('backup.backup.enabled', false) === true) {
|
||||
$schedule->command('backup:clean')->daily()->at('01:00');
|
||||
$schedule->command('backup:run')->daily()->at('02:00');
|
||||
}*/
|
||||
|
||||
// Update the last time the cron was run
|
||||
/** @var CronService $cronSvc */
|
||||
$cronSvc = app(CronService::class);
|
||||
$cronSvc->updateLastRunTime();
|
||||
}
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
namespace App\Contracts;
|
||||
|
||||
use App\Facades\Utils;
|
||||
use App\Models\Award as AwardModel;
|
||||
use App\Models\User;
|
||||
use App\Models\UserAward;
|
||||
use App\Support\Utils;
|
||||
use Exception;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
@@ -36,7 +36,10 @@ abstract class Award
|
||||
* You don't really need to mess with anything below here
|
||||
*/
|
||||
|
||||
/** @var \App\Models\Award|null */
|
||||
protected $award;
|
||||
|
||||
/** @var \App\Models\User|null */
|
||||
protected $user;
|
||||
|
||||
public function __construct(AwardModel $award = null, User $user = null)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Contracts;
|
||||
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use function is_array;
|
||||
use Symfony\Component\Process\Process;
|
||||
|
||||
/**
|
||||
@@ -82,9 +83,9 @@ abstract class Command extends \Illuminate\Console\Command
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $cmd
|
||||
* @param bool $return
|
||||
* @param mixed $verbose
|
||||
* @param array|string $cmd
|
||||
* @param bool $return
|
||||
* @param mixed $verbose
|
||||
*
|
||||
* @throws \Symfony\Component\Process\Exception\RuntimeException
|
||||
* @throws \Symfony\Component\Process\Exception\LogicException
|
||||
@@ -93,16 +94,16 @@ abstract class Command extends \Illuminate\Console\Command
|
||||
*/
|
||||
public function runCommand($cmd, $return = false, $verbose = true): string
|
||||
{
|
||||
if (\is_array($cmd)) {
|
||||
if (is_array($cmd)) {
|
||||
$cmd = implode(' ', $cmd);
|
||||
}
|
||||
|
||||
if ($verbose) {
|
||||
$this->info('Running "'.$cmd.'"');
|
||||
$this->info('Running '.$cmd);
|
||||
}
|
||||
|
||||
$val = '';
|
||||
$process = new Process($cmd);
|
||||
$process = Process::fromShellCommandline($cmd);
|
||||
$process->run(function ($type, $buffer) use ($return, &$val) {
|
||||
if ($return) {
|
||||
$val .= $buffer;
|
||||
|
||||
10
app/Contracts/Composer.php
Normal file
10
app/Contracts/Composer.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Contracts;
|
||||
|
||||
use Illuminate\View\View;
|
||||
|
||||
abstract class Composer
|
||||
{
|
||||
abstract public function compose(View $view);
|
||||
}
|
||||
@@ -6,6 +6,7 @@ use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||
use Illuminate\Http\Request;
|
||||
use Laracasts\Flash\Flash;
|
||||
|
||||
/**
|
||||
* Class Controller
|
||||
@@ -26,7 +27,7 @@ abstract class Controller extends \Illuminate\Routing\Controller
|
||||
*/
|
||||
public function flashError($message, $route)
|
||||
{
|
||||
flash()->error($message);
|
||||
Flash::error($message);
|
||||
return redirect(route($route))->withInput();
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,12 @@ abstract class Enum
|
||||
final public static function label($value)
|
||||
{
|
||||
if (isset(static::$labels[$value])) {
|
||||
return trans(static::$labels[$value]);
|
||||
$val = static::$labels[$value];
|
||||
if (strpos($val, '.') !== false) {
|
||||
return trans($val);
|
||||
}
|
||||
|
||||
return $val;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
12
app/Contracts/Event.php
Normal file
12
app/Contracts/Event.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Contracts;
|
||||
|
||||
use Illuminate\Foundation\Events\Dispatchable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class Event
|
||||
{
|
||||
use Dispatchable;
|
||||
use SerializesModels;
|
||||
}
|
||||
@@ -2,15 +2,16 @@
|
||||
|
||||
namespace App\Contracts;
|
||||
|
||||
/**
|
||||
* Class FormRequest
|
||||
*/
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class FormRequest extends \Illuminate\Foundation\Http\FormRequest
|
||||
{
|
||||
/**
|
||||
* Authorized by default
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -18,8 +19,22 @@ class FormRequest extends \Illuminate\Foundation\Http\FormRequest
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
public function rules(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a given column as being unique
|
||||
*
|
||||
* @param $table
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function unique($table)
|
||||
{
|
||||
return [
|
||||
Rule::unique($table)->ignore($this->id, 'id'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
namespace App\Contracts;
|
||||
|
||||
use App\Models\Airline;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Log;
|
||||
use Validator;
|
||||
|
||||
/**
|
||||
* Common functionality used across all of the importers
|
||||
@@ -51,9 +51,9 @@ class ImportExport
|
||||
*
|
||||
* @param $code
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Model
|
||||
* @return Airline
|
||||
*/
|
||||
public function getAirline($code)
|
||||
public function getAirline($code): Airline
|
||||
{
|
||||
$airline = Airline::firstOrCreate([
|
||||
'icao' => $code,
|
||||
|
||||
@@ -16,7 +16,7 @@ abstract class Listener
|
||||
public function subscribe(Dispatcher $events): void
|
||||
{
|
||||
foreach (static::$callbacks as $klass => $cb) {
|
||||
$events->listen($klass, get_class($this).'@'.$cb);
|
||||
$events->listen($klass, static::class.'@'.$cb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,13 +12,24 @@ abstract class Metar
|
||||
{
|
||||
/**
|
||||
* Implement retrieving the METAR - return the METAR string. Needs to be protected,
|
||||
* since this shouldn't be directly called. Call `get_metar($icao)` instead
|
||||
* since this shouldn't be directly called. Call `metar($icao)`. If not implemented,
|
||||
* return a blank string
|
||||
*
|
||||
* @param $icao
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
abstract protected function metar($icao): string;
|
||||
abstract protected function get_metar($icao): string;
|
||||
|
||||
/**
|
||||
* Implement retrieving the TAF - return the string. Call `taf($icao)`. If not implemented,
|
||||
* return a blank string
|
||||
*
|
||||
* @param $icao
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
abstract protected function get_taf($icao): string;
|
||||
|
||||
/**
|
||||
* Download the METAR, wrap in caching
|
||||
@@ -27,9 +38,9 @@ abstract class Metar
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_metar($icao): string
|
||||
public function metar($icao): string
|
||||
{
|
||||
$cache = config('cache.keys.WEATHER_LOOKUP');
|
||||
$cache = config('cache.keys.METAR_WEATHER_LOOKUP');
|
||||
$key = $cache['key'].$icao;
|
||||
|
||||
if (Cache::has($key)) {
|
||||
@@ -40,7 +51,7 @@ abstract class Metar
|
||||
}
|
||||
|
||||
try {
|
||||
$raw_metar = $this->metar($icao);
|
||||
$raw_metar = $this->get_metar($icao);
|
||||
} catch (\Exception $e) {
|
||||
Log::error('Error getting METAR: '.$e->getMessage(), $e->getTrace());
|
||||
return '';
|
||||
@@ -52,4 +63,37 @@ abstract class Metar
|
||||
|
||||
return $raw_metar;
|
||||
}
|
||||
|
||||
/**
|
||||
* Download the TAF, wrap in caching
|
||||
*
|
||||
* @param $icao
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function taf($icao): string
|
||||
{
|
||||
$cache = config('cache.keys.TAF_WEATHER_LOOKUP');
|
||||
$key = $cache['key'].$icao;
|
||||
|
||||
if (Cache::has($key)) {
|
||||
$taf = Cache::get($key);
|
||||
if ($taf !== '') {
|
||||
return $taf;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
$taf = $this->get_taf($icao);
|
||||
} catch (\Exception $e) {
|
||||
Log::error('Error getting TAF: '.$e->getMessage(), $e->getTrace());
|
||||
return '';
|
||||
}
|
||||
|
||||
if ($taf !== '') {
|
||||
Cache::put($key, $taf, $cache['time']);
|
||||
}
|
||||
|
||||
return $taf;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,11 @@
|
||||
namespace App\Contracts;
|
||||
|
||||
use App\Support\Database;
|
||||
use DB;
|
||||
use Exception;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
/**
|
||||
* Class Migration
|
||||
@@ -25,6 +28,29 @@ abstract class Migration extends \Illuminate\Database\Migrations\Migration
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a module and enable it
|
||||
*
|
||||
* @param array $attrs
|
||||
*/
|
||||
public function addModule(array $attrs)
|
||||
{
|
||||
$module = array_merge([
|
||||
'enabled' => true,
|
||||
'created_at' => DB::raw('NOW()'),
|
||||
'updated_at' => DB::raw('NOW()'),
|
||||
], $attrs);
|
||||
|
||||
try {
|
||||
DB::table('modules')->insert($module);
|
||||
} catch (Exception $e) {
|
||||
// setting already exists, just ignore it
|
||||
if ($e->getCode() === 23000) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Seed a YAML file into the database
|
||||
*
|
||||
@@ -35,7 +61,7 @@ abstract class Migration extends \Illuminate\Database\Migrations\Migration
|
||||
try {
|
||||
$path = base_path($file);
|
||||
Database::seed_from_yaml_file($path, false);
|
||||
} catch (\Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
Log::error('Unable to load '.$file.' file');
|
||||
Log::error($e);
|
||||
}
|
||||
@@ -52,7 +78,7 @@ abstract class Migration extends \Illuminate\Database\Migrations\Migration
|
||||
foreach ($rows as $row) {
|
||||
try {
|
||||
DB::table($table)->insert($row);
|
||||
} catch (\Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
// setting already exists, just ignore it
|
||||
if ($e->getCode() === 23000) {
|
||||
continue;
|
||||
@@ -60,4 +86,22 @@ abstract class Migration extends \Illuminate\Database\Migrations\Migration
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an award from the migrations (for example, if you're adding an award module)
|
||||
*
|
||||
* @param array $award See \App\Models\Awardv
|
||||
*
|
||||
* @throws \Illuminate\Validation\ValidationException
|
||||
*/
|
||||
public function addAward(array $award)
|
||||
{
|
||||
$validator = Validator::make($award, \App\Models\Award::$rules);
|
||||
if ($validator->fails()) {
|
||||
throw new ValidationException($validator);
|
||||
}
|
||||
|
||||
$awardModel = new \App\Models\Award($award);
|
||||
$awardModel->save();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ abstract class Model extends \Illuminate\Database\Eloquent\Model
|
||||
/**
|
||||
* Max length of ID for string columns
|
||||
*/
|
||||
public const ID_MAX_LENGTH = 12;
|
||||
public const ID_MAX_LENGTH = 16;
|
||||
|
||||
/**
|
||||
* For the factories, skip the mutators. Only apply to one instance
|
||||
|
||||
49
app/Contracts/Modules/ServiceProvider.php
Normal file
49
app/Contracts/Modules/ServiceProvider.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace App\Contracts\Modules;
|
||||
|
||||
/**
|
||||
* Base class for module service providers
|
||||
* Add-on module service providers must extend this class. Docs on Service Providers:
|
||||
* https://laravel.com/docs/7.x/providers
|
||||
*
|
||||
* For a sample service provider, view the sample module one:
|
||||
* https://github.com/nabeelio/phpvms-module/blob/master/Providers/SampleServiceProvider.php
|
||||
*/
|
||||
abstract class ServiceProvider extends \Illuminate\Support\ServiceProvider
|
||||
{
|
||||
/**
|
||||
* A boot method is required, even if it doesn't do anything.
|
||||
* https://laravel.com/docs/7.x/providers#the-boot-method
|
||||
*
|
||||
* This is normally where you'd register the routes or other startup tasks for your module
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* This is required to register the links in either the public or admin toolbar
|
||||
* For example, adding a frontend link:
|
||||
*
|
||||
* $this->moduleSvc->addFrontendLink('Sample', '/sample', '', $logged_in=true);
|
||||
*
|
||||
* Or an admin link:
|
||||
*
|
||||
* $this->moduleSvc->addAdminLink('Sample', '/admin/sample');
|
||||
*/
|
||||
public function registerLinks(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Deferred providers:
|
||||
* https://laravel.com/docs/7.x/providers#deferred-providers
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provides(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Notifications;
|
||||
namespace App\Contracts;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class BaseNotification extends Notification implements ShouldQueue
|
||||
class Notification extends \Illuminate\Notifications\Notification implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
public $channels = [];
|
||||
public $requires_opt_in = false;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
// Look in the notifications.channels config and see where this particular
|
||||
// notification can go. Map it to $channels
|
||||
$klass = get_class($this);
|
||||
$klass = static::class;
|
||||
$notif_config = config('notifications.channels', []);
|
||||
if (!array_key_exists($klass, $notif_config)) {
|
||||
Log::error('Notification type '.$klass.' missing from notifications config');
|
||||
Log::error('Notification type '.$klass.' missing from notifications config, defaulting to mail');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,9 @@ namespace App\Contracts;
|
||||
use Illuminate\Validation\Validator;
|
||||
use Prettus\Repository\Eloquent\BaseRepository;
|
||||
|
||||
/**
|
||||
* @mixin \Prettus\Repository\Eloquent\BaseRepository
|
||||
*/
|
||||
abstract class Repository extends BaseRepository
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
namespace App\Contracts;
|
||||
|
||||
use App\Contracts\Unit;
|
||||
use Illuminate\Http\Resources\Json\Resource;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
/**
|
||||
* Class Response
|
||||
* Base class for a resource/response
|
||||
*/
|
||||
class Response extends Resource
|
||||
class Resource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Iterate through the list of $fields and check if they're a "Unit"
|
||||
@@ -59,7 +59,7 @@ class Unit implements ArrayAccess
|
||||
{
|
||||
$response = [];
|
||||
foreach ($this->responseUnits as $unit) {
|
||||
$response[$unit] = $this[$unit];
|
||||
$response[$unit] = $this[$unit] ?? 0;
|
||||
}
|
||||
|
||||
return $response;
|
||||
|
||||
52
app/Cron/Hourly/DeletePireps.php
Normal file
52
app/Cron/Hourly/DeletePireps.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace App\Cron\Hourly;
|
||||
|
||||
use App\Contracts\Listener;
|
||||
use App\Events\CronHourly;
|
||||
use App\Models\Enums\PirepState;
|
||||
use App\Models\Pirep;
|
||||
use App\Services\PirepService;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
/**
|
||||
* Remove cancelled/deleted PIREPs. Look for PIREPs that were created before the setting time
|
||||
* (e.g, 12 hours ago) and are marked with the
|
||||
*/
|
||||
class DeletePireps extends Listener
|
||||
{
|
||||
/**
|
||||
* Remove expired bids
|
||||
*
|
||||
* @param CronHourly $event
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function handle(CronHourly $event): void
|
||||
{
|
||||
$this->deletePireps(setting('pireps.delete_rejected_hours'), PirepState::REJECTED);
|
||||
$this->deletePireps(setting('pireps.delete_cancelled_hours'), PirepState::CANCELLED);
|
||||
}
|
||||
|
||||
/**
|
||||
* Look for and delete PIREPs which match the criteria
|
||||
*
|
||||
* @param int $expire_time_hours The time in hours to look for PIREPs
|
||||
* @param int $state The PirepState enum value
|
||||
*/
|
||||
protected function deletePireps(int $expire_time_hours, int $state)
|
||||
{
|
||||
$dt = Carbon::now()->subHours($expire_time_hours);
|
||||
$pireps = Pirep::whereDate('created_at', '<', $dt)->where(['state' => $state])->get();
|
||||
|
||||
/** @var PirepService $pirepSvc */
|
||||
$pirepSvc = app(PirepService::class);
|
||||
|
||||
/** @var Pirep $pirep */
|
||||
foreach ($pireps as $pirep) {
|
||||
Log::info('Cron: Deleting PIREP id='.$pirep->id.', state='.PirepState::label($state));
|
||||
$pirepSvc->delete($pirep);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ use App\Contracts\Listener;
|
||||
use App\Events\CronMonthly;
|
||||
use App\Models\Enums\ExpenseType;
|
||||
use App\Services\Finance\RecurringFinanceService;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
/**
|
||||
* Go through and apply any finances that are daily
|
||||
@@ -35,6 +36,7 @@ class ApplyExpenses extends Listener
|
||||
*/
|
||||
public function handle(CronMonthly $event): void
|
||||
{
|
||||
Log::info('Monthly: Applying monthly expenses');
|
||||
$this->financeSvc->processExpenses(ExpenseType::MONTHLY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ use App\Contracts\Listener;
|
||||
use App\Events\CronNightly;
|
||||
use App\Models\Enums\ExpenseType;
|
||||
use App\Services\Finance\RecurringFinanceService;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
/**
|
||||
* Go through and apply any finances that are daily
|
||||
@@ -35,6 +36,7 @@ class ApplyExpenses extends Listener
|
||||
*/
|
||||
public function handle(CronNightly $event): void
|
||||
{
|
||||
Log::info('Nightly: Applying daily expenses');
|
||||
$this->financeSvc->processExpenses(ExpenseType::DAILY);
|
||||
}
|
||||
}
|
||||
|
||||
30
app/Cron/Nightly/ClearExpiredSimbrief.php
Normal file
30
app/Cron/Nightly/ClearExpiredSimbrief.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Cron\Nightly;
|
||||
|
||||
use App\Contracts\Listener;
|
||||
use App\Events\CronNightly;
|
||||
use App\Services\SimBriefService;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
/**
|
||||
* Clear any expired SimBrief flight briefs that aren't attached to a PIREP
|
||||
*/
|
||||
class ClearExpiredSimbrief extends Listener
|
||||
{
|
||||
private $simbriefSvc;
|
||||
|
||||
public function __construct(SimBriefService $simbriefSvc)
|
||||
{
|
||||
$this->simbriefSvc = $simbriefSvc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \App\Events\CronNightly $event
|
||||
*/
|
||||
public function handle(CronNightly $event): void
|
||||
{
|
||||
Log::info('Nightly: Removing expired Simbrief entries');
|
||||
$this->simbriefSvc->removeExpiredEntries();
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ namespace App\Cron\Nightly;
|
||||
use App\Contracts\Listener;
|
||||
use App\Events\CronNightly;
|
||||
use App\Services\VersionService;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
/**
|
||||
* Determine if any pilots should be set to ON LEAVE status
|
||||
@@ -28,6 +29,7 @@ class NewVersionCheck extends Listener
|
||||
*/
|
||||
public function handle(CronNightly $event): void
|
||||
{
|
||||
Log::info('Nightly: Checking for new version');
|
||||
$this->versionSvc->isNewVersionAvailable();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,8 @@ namespace App\Cron\Nightly;
|
||||
|
||||
use App\Contracts\Listener;
|
||||
use App\Events\CronNightly;
|
||||
use App\Models\Enums\UserState;
|
||||
use App\Models\User;
|
||||
use App\Services\UserService;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
/**
|
||||
* Determine if any pilots should be set to ON LEAVE status
|
||||
@@ -18,6 +16,8 @@ class PilotLeave extends Listener
|
||||
|
||||
/**
|
||||
* PilotLeave constructor.
|
||||
*
|
||||
* @param UserService $userSvc
|
||||
*/
|
||||
public function __construct(UserService $userSvc)
|
||||
{
|
||||
@@ -34,13 +34,9 @@ class PilotLeave extends Listener
|
||||
*/
|
||||
public function handle(CronNightly $event): void
|
||||
{
|
||||
if (setting('pilots.auto_leave_days') === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
$date = Carbon::now()->subDay(setting('pilots.auto_leave_days'));
|
||||
$users = User::where('status', UserState::ACTIVE)
|
||||
->whereDate('updated_at', '<', $date);
|
||||
Log::info('Cron: Running pilot leave check');
|
||||
$users = $this->userSvc->findUsersOnLeave();
|
||||
Log::info('Found '.count($users).' users on leave');
|
||||
|
||||
foreach ($users as $user) {
|
||||
Log::info('Setting user '.$user->ident.' to ON LEAVE status');
|
||||
|
||||
@@ -35,7 +35,7 @@ class RecalculateBalances extends Listener
|
||||
*/
|
||||
public function handle(CronNightly $event): void
|
||||
{
|
||||
Log::info('Recalculating balances');
|
||||
Log::info('Nightly: Recalculating balances');
|
||||
|
||||
$journals = Journal::all();
|
||||
foreach ($journals as $journal) {
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace App\Cron\Nightly;
|
||||
|
||||
use App\Contracts\Listener;
|
||||
use App\Events\CronNightly;
|
||||
use App\Services\AircraftService;
|
||||
use App\Services\UserService;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
@@ -12,11 +13,13 @@ use Illuminate\Support\Facades\Log;
|
||||
*/
|
||||
class RecalculateStats extends Listener
|
||||
{
|
||||
private $aircraftSvc;
|
||||
private $userSvc;
|
||||
|
||||
public function __construct(UserService $userService)
|
||||
public function __construct(AircraftService $aircraftSvc, UserService $userSvc)
|
||||
{
|
||||
$this->userSvc = $userService;
|
||||
$this->aircraftSvc = $aircraftSvc;
|
||||
$this->userSvc = $userSvc;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -29,10 +32,10 @@ class RecalculateStats extends Listener
|
||||
*/
|
||||
public function handle(CronNightly $event): void
|
||||
{
|
||||
Log::info('Recalculating balances');
|
||||
|
||||
Log::info('Nightly: Recalculating user stats');
|
||||
$this->userSvc->recalculateAllUserStats();
|
||||
|
||||
Log::info('Done recalculating stats');
|
||||
Log::info('Nightly: Recalcuating aircraft status');
|
||||
$this->aircraftSvc->recalculateStats();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,8 @@ class SetActiveFlights extends Listener
|
||||
*/
|
||||
public function handle(CronNightly $event): void
|
||||
{
|
||||
Log::info('Nightly: Setting active flights');
|
||||
|
||||
$this->checkFlights();
|
||||
}
|
||||
|
||||
@@ -42,23 +44,18 @@ class SetActiveFlights extends Listener
|
||||
continue;
|
||||
}
|
||||
|
||||
// Set to visible by default
|
||||
$flight->visible = true;
|
||||
|
||||
// dates aren't set, so just save if there were any changes above
|
||||
// and move onto the next one
|
||||
if ($flight->start_date === null || $flight->end_date === null) {
|
||||
if ($flight->days !== null && $flight->days > 0) {
|
||||
$visible = Days::isToday($flight->days);
|
||||
if ($flight->visible !== $visible) {
|
||||
Log::info('Flight '.$flight->ident.' to '.($visible ? 'shown' : 'hidden'));
|
||||
|
||||
$flight->visible = $visible;
|
||||
if ($visible === false) {
|
||||
Log::info('Today='.date('N').', start=no, mask='.$flight->days.', in='
|
||||
.Days::in($flight->days, Days::$isoDayMap[(int) date('N')]));
|
||||
}
|
||||
$flight->visible = Days::isToday($flight->days);
|
||||
if (!$flight->visible) {
|
||||
Log::info('Today='.date('N').', start=no, mask='.$flight->days.', in='
|
||||
.Days::in($flight->days, Days::$isoDayMap[(int) date('N')]));
|
||||
}
|
||||
} else {
|
||||
Log::info('Toggling flight '.$flight->ident.' to visible');
|
||||
$flight->visible = true;
|
||||
}
|
||||
|
||||
$flight->save();
|
||||
@@ -71,20 +68,11 @@ class SetActiveFlights extends Listener
|
||||
// and then make sure if days of the week are specified, check that too
|
||||
if ($today->gte($flight->start_date) && $today->lte($flight->end_date)) {
|
||||
if ($flight->days !== null && $flight->days > 0) {
|
||||
$visible = Days::isToday($flight->days);
|
||||
if ($flight->visible !== $visible) {
|
||||
Log::info('Toggling flight '.$flight->ident.' to '.($visible ? 'shown' : 'hidden').'');
|
||||
|
||||
$flight->visible = $visible;
|
||||
if ($visible === false) {
|
||||
Log::info('Today='.date('N').', start='.$flight->start_date
|
||||
.', end='.$flight->end_date.', mask='.$flight->days.', in='
|
||||
$flight->visible = Days::isToday($flight->days);
|
||||
if (!$flight->visible) {
|
||||
Log::info('Today='.date('N').', start=no, mask='.$flight->days.', in='
|
||||
.Days::in($flight->days, Days::$isoDayMap[(int) date('N')]));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Log::info('Toggling flight '.$flight->ident.' to visible');
|
||||
$flight->visible = true;
|
||||
}
|
||||
} else {
|
||||
$flight->visible = false;
|
||||
|
||||
@@ -1,24 +1,30 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Airport;
|
||||
use App\Models\Enums\AircraftState;
|
||||
use App\Models\Enums\AircraftStatus;
|
||||
use App\Models\Subfleet;
|
||||
use App\Support\ICAO;
|
||||
use Faker\Generator as Faker;
|
||||
|
||||
$factory->define(App\Models\Aircraft::class, function (Faker $faker) {
|
||||
return [
|
||||
'id' => null,
|
||||
'subfleet_id' => function () {
|
||||
return factory(App\Models\Subfleet::class)->create()->id;
|
||||
return factory(Subfleet::class)->create()->id;
|
||||
},
|
||||
'airport_id' => function () {
|
||||
return factory(App\Models\Airport::class)->create()->id;
|
||||
return factory(Airport::class)->create()->id;
|
||||
},
|
||||
'iata' => $faker->unique()->text(5),
|
||||
'icao' => $faker->unique()->text(5),
|
||||
'name' => $faker->text(50),
|
||||
'registration' => $faker->unique()->text(10),
|
||||
'hex_code' => \App\Support\ICAO::createHexCode(),
|
||||
'hex_code' => ICAO::createHexCode(),
|
||||
'mtow' => $faker->randomFloat(2, 0, 50000),
|
||||
'zfw' => $faker->randomFloat(2, 0, 50000),
|
||||
'status' => \App\Models\Enums\AircraftStatus::ACTIVE,
|
||||
'state' => \App\Models\Enums\AircraftState::PARKED,
|
||||
'status' => AircraftStatus::ACTIVE,
|
||||
'state' => AircraftState::PARKED,
|
||||
'created_at' => $faker->dateTimeBetween('-1 week', 'now'),
|
||||
'updated_at' => function (array $pirep) {
|
||||
return $pirep['created_at'];
|
||||
|
||||
@@ -9,7 +9,7 @@ use Hashids\Hashids;
|
||||
$factory->define(App\Models\Airline::class, function (Faker $faker) {
|
||||
return [
|
||||
'id' => null,
|
||||
'icao' => function (array $apt) use ($faker) {
|
||||
'icao' => function (array $apt) {
|
||||
$hashids = new Hashids(microtime(), 5);
|
||||
$mt = str_replace('.', '', microtime(true));
|
||||
|
||||
|
||||
@@ -8,34 +8,36 @@ $factory->define(App\Models\Flight::class, function (Faker $faker) {
|
||||
return [
|
||||
'id' => $faker->unique()->numberBetween(10, 10000000),
|
||||
'airline_id' => function () {
|
||||
return factory(App\Models\Airline::class)->create()->id;
|
||||
return factory(\App\Models\Airline::class)->create()->id;
|
||||
},
|
||||
'flight_number' => $faker->unique()->numberBetween(10, 1000000),
|
||||
'route_code' => $faker->randomElement(['', $faker->text(5)]),
|
||||
'route_leg' => $faker->randomElement(['', $faker->numberBetween(0, 1000)]),
|
||||
'dpt_airport_id' => function () {
|
||||
return factory(App\Models\Airport::class)->create()->id;
|
||||
return factory(\App\Models\Airport::class)->create()->id;
|
||||
},
|
||||
'arr_airport_id' => function () {
|
||||
return factory(App\Models\Airport::class)->create()->id;
|
||||
return factory(\App\Models\Airport::class)->create()->id;
|
||||
},
|
||||
'alt_airport_id' => function () {
|
||||
return factory(App\Models\Airport::class)->create()->id;
|
||||
return factory(\App\Models\Airport::class)->create()->id;
|
||||
},
|
||||
'distance' => $faker->numberBetween(1, 1000),
|
||||
'route' => null,
|
||||
'level' => 0,
|
||||
'dpt_time' => $faker->time(),
|
||||
'arr_time' => $faker->time(),
|
||||
'flight_time' => $faker->numberBetween(60, 360),
|
||||
'has_bid' => false,
|
||||
'active' => true,
|
||||
'visible' => true,
|
||||
'days' => 0,
|
||||
'start_date' => null,
|
||||
'end_date' => null,
|
||||
'created_at' => $faker->dateTimeBetween('-1 week', 'now'),
|
||||
'updated_at' => static function (array $flight) {
|
||||
'distance' => $faker->numberBetween(1, 1000),
|
||||
'route' => null,
|
||||
'level' => 0,
|
||||
'dpt_time' => $faker->time(),
|
||||
'arr_time' => $faker->time(),
|
||||
'flight_time' => $faker->numberBetween(60, 360),
|
||||
'load_factor' => $faker->randomElement([15, 20, 50, 90, 100]),
|
||||
'load_factor_variance' => $faker->randomElement([15, 20, 50, 90, 100]),
|
||||
'has_bid' => false,
|
||||
'active' => true,
|
||||
'visible' => true,
|
||||
'days' => 0,
|
||||
'start_date' => null,
|
||||
'end_date' => null,
|
||||
'created_at' => $faker->dateTimeBetween('-1 week', 'now'),
|
||||
'updated_at' => static function (array $flight) {
|
||||
return $flight['created_at'];
|
||||
},
|
||||
];
|
||||
|
||||
@@ -6,7 +6,7 @@ $factory->define(App\Models\JournalTransactions::class, function (Faker $faker)
|
||||
return [
|
||||
'transaction_group' => \Ramsey\Uuid\Uuid::uuid4()->toString(),
|
||||
'journal_id' => function () {
|
||||
return factory(App\Models\Journal::class)->create()->id;
|
||||
return factory(\App\Models\Journal::class)->create()->id;
|
||||
},
|
||||
'credit' => $faker->numberBetween(100, 10000),
|
||||
'debit' => $faker->numberBetween(100, 10000),
|
||||
|
||||
@@ -6,7 +6,7 @@ $factory->define(App\Models\News::class, function (Faker $faker) {
|
||||
return [
|
||||
'id' => null,
|
||||
'user_id' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
return factory(\App\Models\User::class)->create()->id;
|
||||
},
|
||||
'subject' => $faker->text(),
|
||||
'body' => $faker->sentence,
|
||||
|
||||
@@ -10,8 +10,8 @@ use Faker\Generator as Faker;
|
||||
* Create a new PIREP
|
||||
*/
|
||||
$factory->define(App\Models\Pirep::class, function (Faker $faker) {
|
||||
$airline = factory(App\Models\Airline::class)->create();
|
||||
$flight = factory(App\Models\Flight::class)->create([
|
||||
$airline = factory(\App\Models\Airline::class)->create();
|
||||
$flight = factory(\App\Models\Flight::class)->create([
|
||||
'airline_id' => $airline->id,
|
||||
]);
|
||||
|
||||
@@ -21,10 +21,10 @@ $factory->define(App\Models\Pirep::class, function (Faker $faker) {
|
||||
return $airline->id;
|
||||
},
|
||||
'user_id' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
return factory(\App\Models\User::class)->create()->id;
|
||||
},
|
||||
'aircraft_id' => function () {
|
||||
return factory(App\Models\Aircraft::class)->create()->id;
|
||||
return factory(\App\Models\Aircraft::class)->create()->id;
|
||||
},
|
||||
'flight_id' => function () use ($flight) {
|
||||
return $flight->id;
|
||||
|
||||
21
app/Database/factories/SimbriefFactory.php
Normal file
21
app/Database/factories/SimbriefFactory.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
/** @var \Illuminate\Database\Eloquent\Factory $factory */
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Faker\Generator as Faker;
|
||||
|
||||
$factory->define(App\Models\SimBrief::class, function (Faker $faker) {
|
||||
return [
|
||||
'id' => $faker->unique()->numberBetween(10, 10000000),
|
||||
'user_id' => null,
|
||||
'flight_id' => null,
|
||||
'pirep_id' => null,
|
||||
'acars_xml' => '',
|
||||
'ofp_xml' => '',
|
||||
'created_at' => Carbon::now('UTC')->toDateTimeString(),
|
||||
'updated_at' => function (array $sb) {
|
||||
return $sb['created_at'];
|
||||
},
|
||||
];
|
||||
});
|
||||
@@ -6,7 +6,7 @@ $factory->define(App\Models\Subfleet::class, function (Faker $faker) {
|
||||
return [
|
||||
'id' => null,
|
||||
'airline_id' => function () {
|
||||
return factory(App\Models\Airline::class)->create()->id;
|
||||
return factory(\App\Models\Airline::class)->create()->id;
|
||||
},
|
||||
'name' => $faker->unique()->text(50),
|
||||
'type' => $faker->unique()->text(7),
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Airline;
|
||||
use App\Models\Enums\UserState;
|
||||
use Faker\Generator as Faker;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
|
||||
$factory->define(App\Models\User::class, function (Faker $faker) {
|
||||
static $password;
|
||||
|
||||
return [
|
||||
'id' => null,
|
||||
'pilot_id' => 0,
|
||||
'pilot_id' => null,
|
||||
'name' => $faker->name,
|
||||
'email' => $faker->safeEmail,
|
||||
'password' => $password ?: $password = Hash::make('secret'),
|
||||
'api_key' => $faker->sha1,
|
||||
'airline_id' => function () {
|
||||
return factory(App\Models\Airline::class)->create()->id;
|
||||
return factory(Airline::class)->create()->id;
|
||||
},
|
||||
'rank_id' => 1,
|
||||
'flights' => $faker->numberBetween(0, 1000),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use App\Contracts\Migration;
|
||||
use App\Models\Pirep;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
@@ -24,7 +25,7 @@ class CreateUsersTable extends Migration
|
||||
$table->string('country', 2)->nullable();
|
||||
$table->string('home_airport_id', 5)->nullable();
|
||||
$table->string('curr_airport_id', 5)->nullable();
|
||||
$table->string('last_pirep_id', \App\Models\Pirep::ID_MAX_LENGTH)->nullable();
|
||||
$table->string('last_pirep_id', Pirep::ID_MAX_LENGTH)->nullable();
|
||||
$table->unsignedBigInteger('flights')->default(0);
|
||||
$table->unsignedBigInteger('flight_time')->nullable()->default(0);
|
||||
$table->unsignedBigInteger('transfer_time')->nullable()->default(0);
|
||||
|
||||
@@ -5,11 +5,6 @@ use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class RolesPermissionsTables extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
// Create table for storing roles
|
||||
@@ -79,11 +74,6 @@ class RolesPermissionsTables extends Migration
|
||||
$this->addData('roles', $roles);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('permission_user');
|
||||
|
||||
@@ -6,11 +6,6 @@ use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePasswordResetsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('password_resets', function (Blueprint $table) {
|
||||
@@ -20,11 +15,6 @@ class CreatePasswordResetsTable extends Migration
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('password_resets');
|
||||
|
||||
@@ -6,11 +6,6 @@ use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSessionsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('sessions', function (Blueprint $table) {
|
||||
@@ -23,11 +18,6 @@ class CreateSessionsTable extends Migration
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('sessions');
|
||||
|
||||
@@ -5,11 +5,6 @@ use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateAirlinesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('airlines', function (Blueprint $table) {
|
||||
@@ -32,11 +27,6 @@ class CreateAirlinesTable extends Migration
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('airlines');
|
||||
|
||||
@@ -5,11 +5,6 @@ use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateFaresTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('fares', function (Blueprint $table) {
|
||||
@@ -25,11 +20,6 @@ class CreateFaresTable extends Migration
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('fares');
|
||||
|
||||
@@ -7,11 +7,6 @@ use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateFlightTables extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('flights', function (Blueprint $table) {
|
||||
|
||||
@@ -5,11 +5,6 @@ use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateRanksTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('ranks', function (Blueprint $table) {
|
||||
@@ -30,11 +25,6 @@ class CreateRanksTable extends Migration
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('ranks');
|
||||
|
||||
@@ -3,9 +3,6 @@
|
||||
use App\Contracts\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
/**
|
||||
* Class CreateSubfleetTables
|
||||
*/
|
||||
class CreateSubfleetTables extends Migration
|
||||
{
|
||||
public function up()
|
||||
@@ -48,11 +45,6 @@ class CreateSubfleetTables extends Migration
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('subfleets');
|
||||
|
||||
@@ -7,11 +7,6 @@ use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateBidsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('bids', function (Blueprint $table) {
|
||||
@@ -25,11 +20,6 @@ class CreateBidsTable extends Migration
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('bids');
|
||||
|
||||
@@ -6,11 +6,6 @@ use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateJobsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('jobs', function (Blueprint $table) {
|
||||
@@ -24,11 +19,6 @@ class CreateJobsTable extends Migration
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('jobs');
|
||||
|
||||
@@ -6,11 +6,6 @@ use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateFailedJobsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('failed_jobs', function (Blueprint $table) {
|
||||
@@ -23,11 +18,6 @@ class CreateFailedJobsTable extends Migration
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('failed_jobs');
|
||||
|
||||
@@ -6,11 +6,6 @@ use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateNavdataTables extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
/*
|
||||
@@ -31,11 +26,6 @@ class CreateNavdataTables extends Migration
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('navdata');
|
||||
|
||||
@@ -1,21 +1,17 @@
|
||||
<?php
|
||||
|
||||
use App\Contracts\Migration;
|
||||
use App\Contracts\Model;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateAcarsTables extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('acars', function (Blueprint $table) {
|
||||
$table->string('id', 12);
|
||||
$table->string('pirep_id', \App\Contracts\Model::ID_MAX_LENGTH);
|
||||
$table->string('id', Model::ID_MAX_LENGTH);
|
||||
$table->string('pirep_id', Model::ID_MAX_LENGTH);
|
||||
$table->unsignedTinyInteger('type');
|
||||
$table->unsignedInteger('nav_type')->nullable();
|
||||
$table->unsignedInteger('order')->default(0);
|
||||
@@ -43,11 +39,6 @@ class CreateAcarsTables extends Migration
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('acars');
|
||||
|
||||
@@ -2,14 +2,10 @@
|
||||
|
||||
use App\Contracts\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateStatsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('stats', function (Blueprint $table) {
|
||||
@@ -22,37 +18,10 @@ class CreateStatsTable extends Migration
|
||||
$table->primary('id');
|
||||
$table->timestamps();
|
||||
});
|
||||
/*$this->addCounterGroups([
|
||||
'flights' => 1,
|
||||
]);
|
||||
|
||||
$stats = [
|
||||
[
|
||||
'id' => $this->formatSettingId('flights.total_flights'),
|
||||
'order' => $this->getNextOrderNumber('flights'),
|
||||
'value' => 0,
|
||||
'type' => 'int',
|
||||
'description' => 'Total number of flights in the VA',
|
||||
],
|
||||
[
|
||||
'id' => $this->formatSettingId('flights.total_time'),
|
||||
'order' => $this->getNextOrderNumber('flights'),
|
||||
'value' => 0,
|
||||
'type' => 'int',
|
||||
'description' => 'Total number of hours in the VA',
|
||||
],
|
||||
];
|
||||
|
||||
$this->addData('stats', $stats);*/
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('settings');
|
||||
Schema::dropIfExists('stats');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,11 +17,6 @@ class CreateNewsTable extends Migration
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('news');
|
||||
|
||||
@@ -3,14 +3,10 @@
|
||||
use App\Contracts\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Modules\Awards\Awards\PilotFlightAwards;
|
||||
|
||||
class CreateAwardsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('awards', function (Blueprint $table) {
|
||||
@@ -23,7 +19,6 @@ class CreateAwardsTable extends Migration
|
||||
// EG, the airports has an internal expense for gate costs
|
||||
$table->string('ref_model')->nullable();
|
||||
$table->text('ref_model_params')->nullable();
|
||||
//$table->string('ref_model_id', 36)->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
@@ -38,13 +33,20 @@ class CreateAwardsTable extends Migration
|
||||
|
||||
$table->index(['user_id', 'award_id']);
|
||||
});
|
||||
|
||||
/**
|
||||
* Add a default, sample award
|
||||
*/
|
||||
$award = [
|
||||
'name' => 'Pilot 50 flights',
|
||||
'description' => 'When a pilot has 50 flights, give this award',
|
||||
'ref_model' => PilotFlightAwards::class,
|
||||
'ref_model_params' => 50,
|
||||
];
|
||||
|
||||
$this->addAward($award);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('awards');
|
||||
|
||||
@@ -6,11 +6,6 @@ use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateJournalTransactionsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('journal_transactions', function (Blueprint $table) {
|
||||
@@ -34,11 +29,6 @@ class CreateJournalTransactionsTable extends Migration
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('journal_transactions');
|
||||
|
||||
@@ -6,11 +6,6 @@ use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateJournalsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('journals', function (Blueprint $table) {
|
||||
@@ -24,11 +19,6 @@ class CreateJournalsTable extends Migration
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('journals');
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use App\Contracts\Migration;
|
||||
use App\Contracts\Model;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
@@ -14,7 +15,7 @@ class CreateFilesTable extends Migration
|
||||
public function up()
|
||||
{
|
||||
Schema::create('files', function (Blueprint $table) {
|
||||
$table->string('id', \App\Contracts\Model::ID_MAX_LENGTH);
|
||||
$table->string('id', Model::ID_MAX_LENGTH);
|
||||
$table->string('name');
|
||||
$table->string('description')->nullable();
|
||||
$table->string('disk')->nullable();
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use App\Contracts\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddReadonlyToRoles extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('roles', static function (Blueprint $table) {
|
||||
@@ -23,11 +19,6 @@ class AddReadonlyToRoles extends Migration
|
||||
->update(['read_only' => true]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('roles', static function (Blueprint $table) {
|
||||
|
||||
@@ -1,24 +1,22 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use App\Contracts\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Kinda of gross operations to change the pilot ID column
|
||||
* 1. Add an `pilot_id` column, which will get populated with the current ID
|
||||
* 2. Drop the `id` column, and then recreate it as a string field
|
||||
* 3. Iterate through all of the users and set their `id` to the `pilot_id`
|
||||
* 4. Change the other tables column types that reference `user_id`
|
||||
*/
|
||||
class UsersAddPilotId extends Migration
|
||||
{
|
||||
/**
|
||||
* Kinda of gross operations to change the pilot ID column
|
||||
* 1. Add an `pilot_id` column, which will get populated with the current ID
|
||||
* 2. Drop the `id` column, and then recreate it as a string field
|
||||
* 3. Iterate through all of the users and set their `id` to the `pilot_id`
|
||||
* 4. Change the other tables column types that reference `user_id`
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
Schema::table('users', static function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('pilot_id')
|
||||
->after('id')
|
||||
->unique()
|
||||
@@ -26,15 +24,9 @@ class UsersAddPilotId extends Migration
|
||||
->index('users_pilot_id');
|
||||
});
|
||||
|
||||
// Migrate the current pilot IDs
|
||||
DB::update('UPDATE `users` SET `pilot_id`=`id`');
|
||||
DB::table('users')->update(['pilot_id' => DB::raw('`id`')]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use App\Contracts\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateNotificationsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('notifications', function (Blueprint $table) {
|
||||
@@ -23,11 +18,6 @@ class CreateNotificationsTable extends Migration
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('notifications');
|
||||
|
||||
@@ -1,36 +1,26 @@
|
||||
<?php
|
||||
|
||||
use App\Contracts\Migration;
|
||||
use App\Models\Enums\PirepState;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Change the PIREP state column to be a TINYINT
|
||||
*/
|
||||
class PirepsChangeStateType extends Migration
|
||||
{
|
||||
/**
|
||||
* Change the PIREP state column to be a TINYINT
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
// Migrate the old rejected state
|
||||
DB::update('UPDATE `pireps` SET `state`='.PirepState::REJECTED
|
||||
.' WHERE state=-1');
|
||||
DB::table('pireps')
|
||||
->where(['state' => -1])
|
||||
->update(['state' => PirepState::REJECTED]);
|
||||
|
||||
// Change the column type to an unsigned small int (tinyint not supported on all)
|
||||
Schema::table('pireps', function (Blueprint $table) {
|
||||
$table->unsignedSmallInteger('state')->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,27 +5,15 @@ use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Add a `flight_id` column to the PIREPs table
|
||||
*/
|
||||
class PirepsAddFlightId extends Migration
|
||||
{
|
||||
/**
|
||||
* Add a `flight_id` column to the PIREPs table
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pireps', function (Blueprint $table) {
|
||||
$table->string('flight_id', Model::ID_MAX_LENGTH)->nullable()->after('aircraft_id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pireps', function (Blueprint $table) {
|
||||
$table->dropColumn('flight_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Add a `flight_type` column to the expenses table
|
||||
*/
|
||||
class ExpensesAddFlightType extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('expenses', function (Blueprint $table) {
|
||||
$table->string('flight_type', 50)
|
||||
->nullable()
|
||||
->after('type');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('expenses', function (Blueprint $table) {
|
||||
$table->dropColumn('flight_type');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use App\Contracts\Migration;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Turn the airport coordinates and other lat/lon coords into decimal type
|
||||
*/
|
||||
class ModifyAirportsCoordinates extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('acars', function ($table) {
|
||||
$table->decimal('lat', 10, 5)->change()->default(0.0)->nullable();
|
||||
$table->decimal('lon', 11, 5)->change()->default(0.0)->nullable();
|
||||
});
|
||||
|
||||
Schema::table('airports', function ($table) {
|
||||
$table->decimal('lat', 10, 5)->change()->default(0.0)->nullable();
|
||||
$table->decimal('lon', 11, 5)->change()->default(0.0)->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
use App\Contracts\Migration;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Allow the flight field value to be nullable
|
||||
*/
|
||||
class FlightFieldNullable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('flight_field_values', function ($table) {
|
||||
$table->text('value')->change()->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use App\Contracts\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Add a `load_factor` and `load_factor_variance` columns to the expenses table
|
||||
*/
|
||||
class FlightsAddLoadFactor extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('flights', function (Blueprint $table) {
|
||||
$table->decimal('load_factor', 5, 2)
|
||||
->nullable()
|
||||
->after('flight_type');
|
||||
|
||||
$table->decimal('load_factor_variance', 5, 2)
|
||||
->nullable()
|
||||
->after('load_factor');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('flights', function (Blueprint $table) {
|
||||
$table->dropColumn('load_factor');
|
||||
$table->dropColumn('load_factor_variance');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
use App\Contracts\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Add a `pilot_pay` column for a fixed amount to pay to a pilot for a flight
|
||||
*/
|
||||
class FlightsAddPilotPay extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('flights', function (Blueprint $table) {
|
||||
$table->decimal('pilot_pay')
|
||||
->nullable()
|
||||
->after('route');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('flights', function (Blueprint $table) {
|
||||
$table->dropColumn('pilot_pay');
|
||||
});
|
||||
}
|
||||
}
|
||||
22
app/Database/migrations/2020_03_06_141153_fares_add_type.php
Normal file
22
app/Database/migrations/2020_03_06_141153_fares_add_type.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
use App\Contracts\Migration;
|
||||
use App\Models\Enums\FareType;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Add a `pilot_pay` column for a fixed amount to pay to a pilot for a flight
|
||||
*/
|
||||
class FaresAddType extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('fares', function (Blueprint $table) {
|
||||
$table->unsignedTinyInteger('type')
|
||||
->default(FareType::PASSENGER)
|
||||
->nullable()
|
||||
->after('capacity');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use App\Contracts\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Increase string ID lengths because of collisions
|
||||
*/
|
||||
class IncreaseIdLengths extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$tables = [
|
||||
'acars' => ['id', 'pirep_id'],
|
||||
'bids' => ['flight_id'],
|
||||
'flights' => ['id'],
|
||||
'pireps' => ['id', 'flight_id'],
|
||||
'flight_fare' => ['flight_id'],
|
||||
'flight_field_values' => ['flight_id'],
|
||||
'flight_subfleet' => ['flight_id'],
|
||||
'pirep_comments' => ['pirep_id'],
|
||||
'pirep_fares' => ['pirep_id'],
|
||||
'pirep_field_values' => ['pirep_id'],
|
||||
'users' => ['last_pirep_id'],
|
||||
];
|
||||
|
||||
foreach ($tables as $table_name => $columns) {
|
||||
Schema::table($table_name, function (Blueprint $table) use ($columns) {
|
||||
foreach ($columns as $column) {
|
||||
$table->string($column, 36)->change();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
use App\Contracts\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Remove the unique index from subfleets.type
|
||||
*/
|
||||
class RemoveSubfleetTypeIndex extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('subfleets', function (Blueprint $table) {
|
||||
$table->dropUnique(['type']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use App\Contracts\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Add a table to store the Simbrief data
|
||||
*/
|
||||
class AddSimbriefTable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('simbrief', function (Blueprint $table) {
|
||||
$table->string('id', 36); // The OFP ID
|
||||
$table->unsignedInteger('user_id');
|
||||
$table->string('flight_id', 36)->nullable();
|
||||
$table->string('pirep_id', 36)->nullable();
|
||||
$table->mediumText('acars_xml');
|
||||
$table->mediumText('ofp_xml');
|
||||
$table->timestamps();
|
||||
|
||||
$table->primary('id');
|
||||
$table->index(['user_id', 'flight_id']);
|
||||
$table->index('pirep_id');
|
||||
$table->unique('pirep_id'); // Can only belong to a single PIREP
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('simbrief');
|
||||
}
|
||||
}
|
||||
35
app/Database/migrations/2020_03_27_174238_create_pages.php
Normal file
35
app/Database/migrations/2020_03_27_174238_create_pages.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use App\Contracts\Migration;
|
||||
use App\Models\Enums\PageType;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Create the pages
|
||||
* https://github.com/nabeelio/phpvms/issues/641
|
||||
*/
|
||||
class CreatePages extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pages', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name');
|
||||
$table->string('slug');
|
||||
$table->string('icon');
|
||||
$table->unsignedSmallInteger('type')->default(PageType::PAGE);
|
||||
$table->boolean('public');
|
||||
$table->boolean('enabled');
|
||||
$table->mediumText('body');
|
||||
$table->timestamps();
|
||||
|
||||
$table->index('slug');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pages');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
use App\Contracts\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AirlineRemoveNullable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('airlines', function (Blueprint $table) {
|
||||
$table->dropUnique(['iata']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
use App\Contracts\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class PageIconNullable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pages', function (Blueprint $table) {
|
||||
$table->string('icon')->change()->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
33
app/Database/migrations/2020_06_09_141153_pages_add_link.php
Normal file
33
app/Database/migrations/2020_06_09_141153_pages_add_link.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use App\Contracts\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Add a `link` column and make the body optional. Also add a "new_window" bool
|
||||
* which determines if we open this link in a new window or not
|
||||
*/
|
||||
class PagesAddLink extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pages', function (Blueprint $table) {
|
||||
$table->string('body')->change()->nullable();
|
||||
$table->string('link')
|
||||
->default('')
|
||||
->nullable()
|
||||
->after('body');
|
||||
|
||||
$table->boolean('new_window')->default(false);
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('fares', function (Blueprint $table) {
|
||||
$table->dropColumn('link');
|
||||
$table->dropColumn('new_window');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use App\Contracts\Model;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Add two tables for holding user fields and the values
|
||||
*/
|
||||
class CreateUserFields extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
/*
|
||||
* Hold a master list of fields
|
||||
*/
|
||||
Schema::create('user_fields', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name', 200);
|
||||
$table->text('description')->nullable();
|
||||
$table->boolean('show_on_registration')->default(false)->nullable();
|
||||
$table->boolean('required')->default(false)->nullable();
|
||||
$table->boolean('private')->default(false)->nullable();
|
||||
$table->boolean('active')->default(true)->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
/*
|
||||
* The values for the actual fields
|
||||
*/
|
||||
Schema::create('user_field_values', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('user_field_id');
|
||||
$table->string('user_id', Model::ID_MAX_LENGTH);
|
||||
$table->text('value')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->index(['user_field_id', 'user_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use App\Contracts\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Add a `mtow` column for the max takeoff weight
|
||||
*/
|
||||
class AircraftAddMtow extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('aircraft', function (Blueprint $table) {
|
||||
$table->unsignedDecimal('mtow')
|
||||
->nullable()
|
||||
->default(0.0)
|
||||
->after('hex_code');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('aircraft', function (Blueprint $table) {
|
||||
$table->dropColumn('mtow');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use App\Contracts\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateModulesTable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('modules', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->boolean('enabled')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
$this->addModule(['name' => 'Awards']);
|
||||
$this->addModule(['name' => 'Sample']);
|
||||
$this->addModule(['name' => 'VMSAcars']);
|
||||
$this->addModule(['name' => 'Vacentral']);
|
||||
$this->addModule(['name' => 'TestModule']);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('modules');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Change the pages body column type to a Medium Text, max size of 16MB
|
||||
*/
|
||||
class ModifyPagesSize extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pages', function (Blueprint $table) {
|
||||
$table->mediumText('body')->change()->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user