Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP School Cloud #239

Open
wants to merge 583 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
583 commits
Select commit Hold shift + click to select a range
fd487ea
Fixed error in horizontal rule
roryhmartin Sep 28, 2023
0a666d5
Fix diff order
AydinHassan Sep 29, 2023
b94d1a3
Allow to override modal padding
AydinHassan Sep 29, 2023
fe62922
Pad lines in solutions files so ace gutter width is consistent + impr…
AydinHassan Sep 29, 2023
294f40d
Improve editor styles + fix bug with file content syncing
AydinHassan Sep 29, 2023
4458c47
Fix reset after I just broke it, plus improve create file function
AydinHassan Sep 29, 2023
b5388eb
Don't close last tab
AydinHassan Sep 30, 2023
31ed8de
Don't allow adding package without tags
AydinHassan Sep 30, 2023
08d4449
Fix official solution v-model
AydinHassan Sep 30, 2023
633a43f
Created problem modal preview
roryhmartin Oct 1, 2023
7fd8b2c
Merge branch 'cloud-homepage-rory' of github.com:php-school/phpschool…
roryhmartin Oct 1, 2023
c289d42
Remaining homepage mocks
AydinHassan Oct 1, 2023
3a589ef
update deps
AydinHassan Oct 1, 2023
93a4df5
Editor gutter gradient
AydinHassan Oct 1, 2023
3a1c8e2
Merge pull request #258 from php-school/cloud-homepage-rory
AydinHassan Oct 16, 2023
0adbcec
Reorganise components and extract pages and utility components
AydinHassan Oct 16, 2023
887e187
Make vite dev host public
AydinHassan Oct 16, 2023
9453b0e
Remove html nav and footer includes
AydinHassan Oct 16, 2023
280845e
Remove not used templates
AydinHassan Oct 16, 2023
d89d22e
Update main layout and extract header + footer components
AydinHassan Oct 16, 2023
0037407
Import components and delete deprecated config
AydinHassan Oct 16, 2023
566824c
Add cloud assets to blog generator
AydinHassan Oct 16, 2023
30eea47
Symlink image dir for dev
AydinHassan Oct 16, 2023
d26358f
New parsedown parser + vite config
AydinHassan Oct 16, 2023
4d13ea6
Delete temp cloud home route + refactor events&home route
AydinHassan Oct 16, 2023
4e91dbe
Update event getters
AydinHassan Oct 17, 2023
6f6f463
Migrate old styles to tailwindcss
AydinHassan Oct 19, 2023
1db1ac6
Migrate old styles to tailwindcss
AydinHassan Oct 19, 2023
079f430
Fix input width and remove terminal text
AydinHassan Oct 19, 2023
163e584
Remove unused method + x margin
AydinHassan Oct 19, 2023
fe3a1fe
Fix test size
AydinHassan Oct 19, 2023
7e21a57
Remove unused component
AydinHassan Oct 19, 2023
c0e3dfd
Remove unused layout file
AydinHassan Oct 19, 2023
3d77681
Fix font and sizes
AydinHassan Oct 19, 2023
0f10fbc
Fix font size
AydinHassan Oct 19, 2023
f876318
Add logo hover
AydinHassan Oct 19, 2023
1fe1b33
Fix button styles
AydinHassan Oct 19, 2023
c499337
Fix various styles
AydinHassan Oct 19, 2023
c9509a3
Fix margins and remove not used event
AydinHassan Oct 19, 2023
b304125
Remove unused important selector
AydinHassan Oct 19, 2023
08edcc0
Add not about linking img folder in dev
AydinHassan Oct 19, 2023
68de82d
Add ID and scope css
AydinHassan Oct 19, 2023
d7b5f44
Fix blog and migrate to tailwindcss + Vue
AydinHassan Oct 19, 2023
dfbb88a
Animate logo
AydinHassan Oct 19, 2023
0564090
Refactor blog bits and auth
AydinHassan Oct 19, 2023
805f107
Set font in footer
AydinHassan Oct 19, 2023
a0e3803
Improve navbar
AydinHassan Oct 19, 2023
c74b5c0
Delete old nav
AydinHassan Oct 19, 2023
85e4f92
Cleanup
AydinHassan Oct 19, 2023
3c92306
Add socials to main nav
AydinHassan Oct 19, 2023
4e06ccb
Do reset
AydinHassan Oct 19, 2023
d74c617
Use new nav in list workshops view
AydinHassan Oct 19, 2023
76373ee
Use new nav in exercise editor
AydinHassan Oct 19, 2023
f1fdcab
Fix font size in file tree
AydinHassan Oct 19, 2023
baa5665
Recreate submit page
AydinHassan Oct 19, 2023
db5d8c2
Use open sans font
AydinHassan Oct 19, 2023
a334a72
Fix code blocks in problem modal
AydinHassan Oct 19, 2023
e9153b9
More code style fixes
AydinHassan Oct 19, 2023
6db59ca
Docs terminal component with c+p
AydinHassan Oct 23, 2023
24c01bb
Add c+p to homepage terminal
AydinHassan Oct 23, 2023
cba9866
Remove debug
AydinHassan Oct 23, 2023
8809a4e
Add docs components
AydinHassan Oct 23, 2023
b025fa4
Add tw nesting plugin
AydinHassan Oct 23, 2023
a73c0ae
Add base docs styles
AydinHassan Oct 23, 2023
b02ef75
Add highlight.js
AydinHassan Oct 23, 2023
44a48bd
Add docs components
AydinHassan Oct 23, 2023
3285c09
Rewrite some docs pages using vue components
AydinHassan Oct 23, 2023
d5cf8ca
Hero section re-designed
roryhmartin Oct 23, 2023
329b8ce
Merge pull request #259 from php-school/hero-design
AydinHassan Oct 23, 2023
8dc9dce
added gradient opacity to code animation and changed font
roryhmartin Oct 24, 2023
5d59c4f
Moved fonts to cloud.css for consistency,
roryhmartin Oct 25, 2023
85993f2
Merge pull request #260 from php-school/hero-redesign
AydinHassan Oct 25, 2023
4e8cd13
Refactor some more docs
AydinHassan Oct 31, 2023
7ce5e74
Merge pull request #261 from php-school/refactor-more-docs
AydinHassan Oct 31, 2023
1b85f77
Use verify button from exercise editor
AydinHassan Nov 2, 2023
86faeca
Refactor code animation
AydinHassan Nov 6, 2023
00458e1
Create page title component
AydinHassan Nov 6, 2023
79dacd8
Update docs with dark styles
AydinHassan Nov 6, 2023
3078c50
Update notice
AydinHassan Nov 6, 2023
8197bf1
Only show title html if slot exists
AydinHassan Nov 6, 2023
5bb7acd
Allow button to render as a or button
AydinHassan Nov 6, 2023
60d0120
Use consistent button
AydinHassan Nov 6, 2023
6482194
Reformat
AydinHassan Nov 6, 2023
0b8fe52
Update title
AydinHassan Nov 6, 2023
295daa1
Add offline page
AydinHassan Nov 6, 2023
3914767
Remove terminal from homepage
AydinHassan Nov 6, 2023
e9479c9
Update urls
AydinHassan Nov 6, 2023
64dde12
Use header component on pages and update styles to match dark theme
AydinHassan Nov 7, 2023
aaeede2
Add a border to code snippets
AydinHassan Nov 7, 2023
c673c6d
Fix amout vs percentage
AydinHassan Nov 7, 2023
e5261cc
Use page header component
AydinHassan Nov 7, 2023
2d2b317
Add doc search back in + upgrade Algolia libs and restyle
AydinHassan Nov 8, 2023
6f3a155
Reorganise lots of stuff
AydinHassan Nov 9, 2023
6d3c58d
Update to use composition API
AydinHassan Nov 9, 2023
691b1f9
Update to use composition API
AydinHassan Nov 9, 2023
278687c
Update to use composition API
AydinHassan Nov 9, 2023
92ebe27
Extract components
AydinHassan Nov 9, 2023
ecd8b65
Update to use composition API
AydinHassan Nov 9, 2023
1a354dc
Rename dashboard route and display error when trying to start an exer…
AydinHassan Nov 12, 2023
cc2f77c
Downgrade Shepherd.js to fix verify tour weirdness
AydinHassan Nov 12, 2023
35c0f4b
Cleanup
AydinHassan Nov 12, 2023
bb6dd54
Make admin controllers return JSON
AydinHassan Nov 20, 2023
f275151
Delete phtml admin templates
AydinHassan Nov 20, 2023
7ea310d
json serialize entities
AydinHassan Nov 20, 2023
a8c069b
Self timing alert
AydinHassan Nov 20, 2023
f96a3d1
Delete old scss
AydinHassan Nov 20, 2023
ef50790
Delete old libs
AydinHassan Nov 20, 2023
420879c
Rename cloud -> online
AydinHassan Nov 20, 2023
66830cf
Allow to remove prerender
AydinHassan Nov 20, 2023
24d888d
Update admin assets
AydinHassan Nov 20, 2023
47a394b
Update npm deps for admin
AydinHassan Nov 20, 2023
f133be4
Update tailwind config
AydinHassan Nov 20, 2023
51468bb
Merge pull request #262 from php-school/refactor-code-animation
AydinHassan Nov 20, 2023
7e00287
Add admin login css
AydinHassan Nov 20, 2023
3b96964
Admin build chain
AydinHassan Nov 20, 2023
36022f5
Admin Vue.js components
AydinHassan Nov 20, 2023
415a07a
Update main admin view
AydinHassan Nov 20, 2023
4bf47c0
Update routes and config
AydinHassan Nov 20, 2023
49683bf
Delete unused image
AydinHassan Nov 20, 2023
90e2a90
Use formatted date
AydinHassan Nov 20, 2023
92e7508
Fix tests
AydinHassan Nov 21, 2023
0b18c95
Merge pull request #264 from php-school/vuejs-admin
AydinHassan Nov 21, 2023
38ba8b5
Delete old doc templates
AydinHassan Dec 30, 2023
3da73e4
Rewrite docs
AydinHassan Dec 30, 2023
222b8d4
Move images
AydinHassan Dec 30, 2023
a2e85dc
Import cleanup in result renderers
AydinHassan Dec 30, 2023
ece5345
Remove old docs code
AydinHassan Dec 30, 2023
ffe8630
Remove old templates
AydinHassan Dec 30, 2023
0a0cf9d
Update deps
AydinHassan Dec 30, 2023
e16f7fa
Remove old doc code
AydinHassan Dec 30, 2023
db65d31
Rewrite blog
AydinHassan Dec 30, 2023
16d615b
Remove vite manifest
AydinHassan Dec 30, 2023
ae00532
Blog
AydinHassan Dec 30, 2023
e564d2c
Delete old layout
AydinHassan Dec 30, 2023
5c0a32c
SSG support
AydinHassan Dec 30, 2023
d85e485
Use vue router
AydinHassan Dec 30, 2023
6ad3ee8
Layouts
AydinHassan Dec 30, 2023
d0e4992
Events ssg
AydinHassan Dec 30, 2023
1181063
Remove manifest dep
AydinHassan Dec 30, 2023
33b0e85
Docs page
AydinHassan Dec 30, 2023
d42c485
Some code cleanup
AydinHassan Dec 30, 2023
f438574
Rename component
AydinHassan Dec 30, 2023
6aa1966
Update tw config
AydinHassan Dec 30, 2023
c8cb3cf
Update igore file
AydinHassan Dec 30, 2023
0206dd1
Remove blog layout
AydinHassan Dec 30, 2023
734b02b
Update layout
AydinHassan Dec 30, 2023
21ca5ff
Remove login css
AydinHassan Dec 30, 2023
7ec3926
Update vite config
AydinHassan Dec 30, 2023
01f0abd
docs css was moved to the component
AydinHassan Dec 30, 2023
dbe90c5
Update schema tool cmd
AydinHassan Dec 30, 2023
bbc4894
Update dep config
AydinHassan Dec 30, 2023
efd9da8
Homepage improvements
AydinHassan Dec 30, 2023
bc2fcec
Update routes
AydinHassan Dec 30, 2023
e6e00cd
Update main js
AydinHassan Dec 30, 2023
9380e7a
Integrate admin as part of FE SPA using JWT tokens
AydinHassan Jan 5, 2024
448f87f
CS
AydinHassan Jan 5, 2024
e5511e3
Merge pull request #265 from php-school/jwt-admin
AydinHassan Jan 5, 2024
274ddf9
Remove flash messages
AydinHassan Jan 5, 2024
0efc3f4
Made first info section responsive
roryhmartin Nov 4, 2023
4b5c39d
Inital changes to make mockEditor responsive
roryhmartin Nov 4, 2023
e9bfbcf
Changed NAv to make it more responsive on small screens
roryhmartin Nov 4, 2023
155c2e7
MockWorkshopList in section 1 now more responsive.
roryhmartin Nov 4, 2023
8bd6483
Made responsive changes for all screen sizes
roryhmartin Nov 14, 2023
21d9c35
Adjusted spacing between sections
roryhmartin Nov 14, 2023
47896bf
Added back in Codey the Elephant - elephant-swim.svg and adjusted the…
roryhmartin Nov 14, 2023
797de19
Changed elephant images to .png from .svg for sharper image
roryhmartin Nov 14, 2023
d487a40
Some fixes
AydinHassan Jan 8, 2024
b991753
Merge pull request #263 from php-school/home-responsive-changes
AydinHassan Jan 8, 2024
3c59505
change hero image to cleaner version (#266)
roryhmartin Jan 12, 2024
410dd44
Fix styling in mock problem modal
AydinHassan Jan 9, 2024
793f742
Fix button
AydinHassan Jan 9, 2024
c70c2f3
Make the online app part of the main website SPA (#267)
AydinHassan Jan 13, 2024
cefac82
Fix RunExercise DI config
AydinHassan Jan 13, 2024
a4ddb7e
Fix Submit Page
AydinHassan Jan 13, 2024
43e6e11
Fix links
AydinHassan Jan 14, 2024
0cda405
remove overflow-y from mock-results
roryhmartin Jan 16, 2024
dbf939f
Merge pull request #268 from php-school/remove-overflow
AydinHassan Jan 16, 2024
8b19462
add user log in to mobile nav
roryhmartin Jan 16, 2024
aeaf464
Remove useless config file
AydinHassan Jan 14, 2024
4384446
Deduplicate code a little
AydinHassan Jan 17, 2024
033d1f8
Merge pull request #269 from php-school/mobile-nav-improvements
AydinHassan Jan 17, 2024
4d85dec
Fix: sections 3 and 4 animate on scroll
roryhmartin Jan 18, 2024
0f3fd9d
Merge pull request #270 from php-school/add-animation-on-scroll
AydinHassan Jan 18, 2024
150fe9d
eslint
AydinHassan Jan 17, 2024
68dafd5
Reformat
AydinHassan Jan 19, 2024
30ed4d3
GH action
AydinHassan Jan 19, 2024
d118f07
Rerun prettier
AydinHassan Jan 19, 2024
753841d
Merge pull request #271 from php-school/eslint
AydinHassan Jan 19, 2024
3050452
Handle run/linting failures
AydinHassan Jan 25, 2024
7cd2eeb
Fix prettier action name
AydinHassan Jan 25, 2024
5dc8b3f
Cache npm builds
AydinHassan Jan 25, 2024
5edbb80
Merge pull request #273 from php-school/run-failures
AydinHassan Jan 25, 2024
812df27
feat: Implement Responsive Editor Functionality
roryhmartin Jan 31, 2024
35b3574
Merge pull request #274 from php-school/responsive-editor
AydinHassan Jan 31, 2024
2ed2d23
More mobile improvements
AydinHassan Jan 31, 2024
541d41d
Merge pull request #275 from php-school/more-mobile-improvements
AydinHassan Feb 1, 2024
3c98a8a
Various mobile improvements
AydinHassan Feb 4, 2024
a612273
Run prettier
AydinHassan Feb 4, 2024
750db78
Merge pull request #276 from php-school/mobile-improvements-3
AydinHassan Feb 5, 2024
daab7c4
Update scrollbar plugin
AydinHassan Feb 12, 2024
e410613
Improved Pass Notification and Verify Button
roryhmartin Feb 12, 2024
0cf681a
Merge pull request #277 from php-school/editor-improvements
AydinHassan Feb 12, 2024
83edd24
Add slack + twitter components
AydinHassan Feb 13, 2024
448ec86
Improve site nav
AydinHassan Feb 13, 2024
5f62d55
Allow buton to be router link
AydinHassan Feb 13, 2024
adec426
Login with GH button
AydinHassan Feb 13, 2024
2bb48e1
Fix link
AydinHassan Feb 13, 2024
5aeae16
Only display login link when not logged in
AydinHassan Feb 13, 2024
c199a5b
Remove old admin theme images
AydinHassan Feb 13, 2024
9178720
Add support steps to offline page
AydinHassan Feb 16, 2024
c7f6754
Remove useless svgs
AydinHassan Feb 16, 2024
f53732f
Bit more responsive
AydinHassan Feb 16, 2024
d8d2594
Lint
AydinHassan Feb 16, 2024
e8d0d22
Merge pull request #278 from php-school/support-steps
AydinHassan Feb 16, 2024
6abfc77
Update some copy, reimplement slack invite
AydinHassan Mar 3, 2024
f474ab0
Add author urls + gh links to workshops
AydinHassan Mar 3, 2024
2ae6544
Fix doc links
AydinHassan Mar 3, 2024
5ecb250
Prettier
AydinHassan Mar 3, 2024
2071fcf
Fix verify/run button switching on desktop
AydinHassan Mar 9, 2024
2877fc3
Improve getting started section
AydinHassan Mar 9, 2024
534535c
Update links
AydinHassan Mar 9, 2024
4ced2b5
Improve workshop list styles
AydinHassan Mar 9, 2024
6367fd1
Better word
AydinHassan Mar 9, 2024
32972de
Update some more text
AydinHassan Mar 9, 2024
ecb783c
Doc fixes
AydinHassan Mar 10, 2024
b529f54
Use PHP 8.3
AydinHassan Mar 10, 2024
77b315b
prettier
AydinHassan Mar 10, 2024
1f6be21
update deps
AydinHassan Mar 10, 2024
e555a93
Update php builds
AydinHassan Mar 10, 2024
edebf67
Merge pull request #279 from php-school/home-page-copy
AydinHassan Mar 10, 2024
896cfd7
Fake basePath for compilation
AydinHassan Mar 10, 2024
1761a0e
Update workshop
AydinHassan Mar 10, 2024
3d8b2b4
Fix mobile nav toggle
AydinHassan Mar 10, 2024
e872d8f
Improve status bar responsiveness
AydinHassan Mar 10, 2024
c62958b
prettier
AydinHassan Mar 10, 2024
e8c2ec5
Merge pull request #280 from php-school/responsive-improvments
AydinHassan Mar 10, 2024
11f0f14
Fix phpstan and remove lots of unused code
AydinHassan Mar 10, 2024
65b03f4
Run PHPStan on CI
AydinHassan Mar 10, 2024
5b1d6f1
Merge pull request #281 from php-school/phpstan-and-cleanup
AydinHassan Mar 10, 2024
2a15681
Use cs-fixer instead
AydinHassan Mar 10, 2024
ba42824
Merge pull request #282 from php-school/cs-fixer
AydinHassan Mar 10, 2024
d698a19
Add contributors list
AydinHassan Mar 11, 2024
fdc2272
Fix border alignment
AydinHassan Mar 11, 2024
55bcb24
Merge pull request #283 from php-school/contributors
AydinHassan Mar 11, 2024
62cc9de
Merge pull request #284 from php-school/pixelz
AydinHassan Mar 11, 2024
5d3b621
Fix different language highlight + add option to skip highlighting + …
AydinHassan Mar 20, 2024
f8ac980
Fixed some spelling errors and made a format change to how informatio…
roryhmartin Mar 22, 2024
fafb6a0
Merge pull request #285 from php-school/code-highlighting-fixes
AydinHassan Mar 24, 2024
80aada8
Updated descriptions on home page descriptions
roryhmartin Mar 27, 2024
91a5b3b
Merge pull request #286 from php-school/home-edits
AydinHassan Jun 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file removed .DS_Store
Binary file not shown.
18 changes: 11 additions & 7 deletions .docker/files/php-school-fpm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
FROM php:8.1-fpm
FROM php:8.3-fpm AS prod

RUN apt-get -qq update && apt-get install -qqy git zlib1g-dev libzip-dev \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-install pdo pdo_mysql zip
&& docker-php-ext-install pdo pdo_mysql zip sockets

# Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

#RUN pecl install xdebug && docker-php-ext-enable xdebug
#ADD .docker/etc/php-xdebug.ini /usr/local/etc/php/conf.d/php-xdebug.ini

COPY . /var/www/html
WORKDIR /var/www/html

RUN cd /var/www/html && composer install -q --no-dev -o
COPY --from=php:8.1-cli /usr/local/bin/php-cgi /usr/local/bin/php-cgi

RUN cd /var/www/html

CMD ["php-fpm"]

FROM prod AS debug

CMD ["php-fpm"]
RUN pecl install xdebug && docker-php-ext-enable xdebug
ADD .docker/etc/php-xdebug.ini /usr/local/etc/php/conf.d/php-xdebug.ini
13 changes: 8 additions & 5 deletions .env.dist
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
MYSQL_HOST=localhost
MYSQL_HOST=db
MYSQL_DATABASE=phpschool
MYSQL_USER=phpschool
MYSQL_PASSWORD=phpschool
SEND_GRID_API_KEY=sendgripapikey
[email protected]
REDIS_HOST=localhost
CACHE.ENABLE=true
CACHE.FPC.ENABLE=true
DISPLAY_ERRORS=false
REDIS_HOST=redis
CACHE.ENABLE=false
DISPLAY_ERRORS=true
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
GITHUB_TOKEN=
DEV_MODE=true
17 changes: 17 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')

module.exports = {
root: true,
'extends': [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-prettier/skip-formatting'
],
parserOptions: {
ecmaVersion: 'latest'
},
env: {
node: true
}
}
27 changes: 27 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: PhpSchool.io

on:
push:
branches: [ master ]
pull_request:
branches: [ master, online ]

jobs:
build:
runs-on: ubuntu-latest
name: Eslint
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'

- name: Install NPM Dependencies
run: npm ci --no-audit --no-fund --prefer-offline

- name: Eslint
run: npm run lint
16 changes: 8 additions & 8 deletions .github/workflows/phpschool.io.yml → .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,35 @@ on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
branches: [ master, online ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.1]
php: [8.2, 8.3]

name: PHP ${{ matrix.php }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
tools: composer:v2, cs2pr

- name: Install Dependencies
- name: Install PHP Dependencies
run: composer install --prefer-dist

- name: Run phpunit tests
run: composer phpunit

- name: Run phpcs
run: composer cs
run: composer cs:ci

- name: Run psalm
run: composer static
- name: Run PHPStan
run: composer static
27 changes: 27 additions & 0 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: PhpSchool.io

on:
push:
branches: [ master ]
pull_request:
branches: [ master, online ]

jobs:
build:
runs-on: ubuntu-latest
name: Prettier
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'

- name: Install NPM Dependencies
run: npm ci --no-audit --no-fund --prefer-offline

- name: Prettier
run: npm run prettier:ci
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
.idea
node_modules
.DS_Store
.php-cs-fixer.cache
npm-debug.log
/vendor/
/logs/*
!/logs/README.md
/cache/
/config/database.yml
/.phpunit.result.cache

/*.sql
.docker/db/*
.docker/mysql/*

/public/dist/**/*.*
!/public/dist/.gitkeep
/public/workshops.json
/public/uploads
/public/blog
.env
/var
/log
/log

/assets/.vite-ssg-temp/
15 changes: 15 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

$finder = (new PhpCsFixer\Finder())
->in(__DIR__ . '/src')
->in(__DIR__ . '/test')
->in(__DIR__ . '/app')
;

return (new PhpCsFixer\Config())
->setRules([
'@PER-CS2.0' => true,
'declare_strict_types' => true,
'no_unused_imports' => true,
])
->setFinder($finder);
8 changes: 8 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"semi": false,
"tabWidth": 4,
"singleQuote": true,
"printWidth": 100,
"trailingComma": "none"
}
46 changes: 37 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,73 @@
## Install

You will need `composer`, `gulp` and `docker`.
You will need `composer`, `node` and `docker`.

```shell
composer install
npm install
npm run build
cp .env.dist .env
docker-compose build
```

## Run
```shell
docker-compose up -d
docker compose exec php composer install
```

### Create DB Scheme
```shell
docker compose exec php composer app:db:update
```

### Import DB
```shell
docker-compose exec -T db mysql -uroot phpschool -proot < phpschool.sql
```

### Generate Blog
```shell
docker compose exec php composer app:gen:blog
```

Then navigate to `http://localhost` !

Pages are cached on first view.
If you need to clear the cache, run `docker compose exec php composer app:cc`.
## Build CSS & JS

## Build CSS
This needs to be done for the main website (non cloud) to run in development mode.

```shell
gulp sass
npm run build
```

## Build SVG's
## Building CSS & JS for cloud dev

The cloud styles and JS are built using `vite.js` and therefore has a dev/watcher mode with hot/live reloading.

Run:

```shell
gulp svg
npm run dev
```

You will also need to symlink the image directory:

```shell
ln -s ../../assets/img/cloud public/img/cloud
````

## For GitHub login

Add `127.0.0.1 www.phpschool.local` to `/etc/hosts`

Create a GitHub oauth App:

Application Name: PHP School Local
Homepage: http://www.phpschool.local
Authorization Callback URL: http://www.phpschool.local/student-login:

Take the client secret and client ID and place them in your `.env` file under the keys: `GITHUB_CLIENT_ID` & `GITHUB_CLIENT_SECRET`.

### View cache keys

```shell
Expand All @@ -49,7 +77,7 @@ docker-compose exec redis redis-cli keys '*'
### Clear cache

```shell
docker compose exec php composer app:cc
docker-compose exec php composer app:cc
```

## Deploy
Expand Down
Loading
Loading