Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
652 commits
Select commit Hold shift + click to select a range
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
291ff60
Cap CI job runtimes and stop tests on the first error [skip ci]
AydinHassan Oct 16, 2026
dc16582
Online 1/7: merge master into online (#338)
AydinHassan Oct 23, 2026
ce4f84a
Online 2: upgrade PHP dependencies, PHPStan 2 and php-cs-fixer format…
AydinHassan Oct 23, 2026
e2f2634
Online 3: frontend toolchain upgrade and Prettier reformat (#341)
AydinHassan Oct 23, 2026
af9b2f8
Online 4: run exercises in the Docker sandbox, CI on PHP 8.5 (#343)
AydinHassan Oct 23, 2026
58eba66
Only allow known composer packages, at most 10, for student solutions…
AydinHassan Oct 23, 2026
1a5c5e3
Use Reka UI for the modal and confirm dialogs (#303)
AydinHassan Oct 23, 2026
b567408
UI: Headless UI Menu for the student dropdown (#304)
AydinHassan Oct 23, 2026
4061d27
UI: Reka UI Tree for the file tree (#305)
AydinHassan Oct 23, 2026
39319c0
UI: Reka UI Tabs for the editor tabs (#306)
AydinHassan Oct 23, 2026
c0222f2
Use Reka UI's Dialog for the pass notification (#307)
AydinHassan Oct 23, 2026
71269c8
Upgrade to Tailwind CSS 4 (#308)
AydinHassan Oct 23, 2026
1009d8e
Fix the editor tour: clickable over the problem dialog, no leftover o…
AydinHassan Oct 23, 2026
6555e30
Show the home page demos again, and stretch the online workshop list …
AydinHassan Oct 24, 2026
aa67e85
Fix the editor's saved files, and move the file handling into one mod…
AydinHassan Oct 24, 2026
7acb8ca
Move to ESLint 9 and drop unused dev dependencies (#310)
AydinHassan Oct 24, 2026
ca84e75
Use VueUse instead of hand-rolled helpers (#311)
AydinHassan Oct 24, 2026
6bd41dd
Don't bring back starter files the student deleted or renamed (#312)
AydinHassan Oct 24, 2026
db9161f
Recover from failed run and verify requests (#313)
AydinHassan Oct 24, 2026
e437809
Pre-render the blog and events pages with the site nav (#314)
AydinHassan Oct 24, 2026
add4121
Load workshops, posts and events on pages that aren't pre-rendered (#…
AydinHassan Oct 24, 2026
4f96ed0
Log the admin out when the server rejects the token, and throw on eve…
AydinHassan Oct 24, 2026
f0a6be3
Answer every API error as JSON, and 404 admin URLs whose id isn't a UUID
AydinHassan Oct 24, 2026
16f675d
Fix the admin event form: show validation errors, upload posters, res…
AydinHassan Oct 23, 2026
63cd70f
Show a message for every admin error instead of an empty alert
AydinHassan Oct 23, 2026
344d38d
Share the admin search filter between pages
AydinHassan Oct 23, 2026
0615453
Use one confirm dialog for the admin delete, promote and approve prompts
AydinHassan Oct 23, 2026
1ca59ab
Use a FormField component for the admin event form
AydinHassan Oct 23, 2026
270a7ef
Give each admin page one alert instead of a pair per action
AydinHassan Oct 23, 2026
3e140f6
Simplify the admin activity feed
AydinHassan Oct 23, 2026
801a830
Share the admin install chart and loop the workshop detail rows
AydinHassan Oct 23, 2026
984045f
Merge pull request #317 from php-school/admin-404
AydinHassan Oct 24, 2026
b469ce8
Merge pull request #318 from php-school/admin-events
AydinHassan Oct 24, 2026
742e7da
Merge pull request #319 from php-school/admin-more
AydinHassan Oct 24, 2026
58a5539
Merge pull request #320 from php-school/admin-pages
AydinHassan Oct 24, 2026
aa308f2
Merge pull request #321 from php-school/admin-confirm
AydinHassan Oct 24, 2026
bff1981
Merge pull request #322 from php-school/admin-form-fields
AydinHassan Oct 24, 2026
cfade3f
Merge pull request #323 from php-school/admin-alerts
AydinHassan Oct 24, 2026
a5ae78e
Merge pull request #324 from php-school/admin-layout
AydinHassan Oct 24, 2026
380489b
Merge pull request #325 from php-school/admin-charts
AydinHassan Oct 24, 2026
40ef154
Return a JSON 404 when updating an event that doesn't exist
AydinHassan Oct 23, 2026
aeeb2d7
Use 404 and the right wording for missing records in admin actions
AydinHassan Oct 23, 2026
bc11027
Show an error instead of spinning forever when admin login fails unex…
AydinHassan Oct 23, 2026
6d35a23
Send logged-in admins from the login page to the admin
AydinHassan Oct 23, 2026
590e6c8
Use VueUse for the docs copy buttons and the nav resize listener
AydinHassan Oct 23, 2026
f16f3c1
Stop the submit workshop spinner when the request fails
AydinHassan Oct 23, 2026
3d7f2ff
Show an error when the Slack invite request fails and ignore double c…
AydinHassan Oct 23, 2026
bed959a
Simplify the student progress checks
AydinHassan Oct 23, 2026
956fbae
Fix the stuck spinner when adding a Composer package twice
AydinHassan Oct 23, 2026
3e9a6de
Ignore stale Composer search responses and handle failed searches
AydinHassan Oct 23, 2026
61d796f
Use constructor property promotion across services, actions and commands
AydinHassan Oct 23, 2026
4c54c99
Let PHP-DI autowire actions whose factories only passed their typed d…
AydinHassan Oct 23, 2026
20e0c3c
Use VueUse's useAsyncState for request loading state
AydinHassan Oct 24, 2026
524e886
Merge pull request #326 from php-school/admin-actions
AydinHassan Oct 24, 2026
0be3b7d
Merge pull request #327 from php-school/admin-actions-2
AydinHassan Oct 24, 2026
b3f50eb
Merge pull request #328 from php-school/admin-login
AydinHassan Oct 24, 2026
f5fd6cc
Merge pull request #329 from php-school/admin-guard
AydinHassan Oct 24, 2026
b62081d
Merge pull request #330 from php-school/site-widgets
AydinHassan Oct 24, 2026
516cd13
Merge pull request #331 from php-school/submit-page
AydinHassan Oct 24, 2026
0c0324d
Merge pull request #332 from php-school/slack-contrib
AydinHassan Oct 24, 2026
fa4ef05
Merge pull request #333 from php-school/student-store
AydinHassan Oct 24, 2026
6a486e4
Merge pull request #334 from php-school/composer-panel
AydinHassan Oct 24, 2026
21b0765
Merge pull request #335 from php-school/package-search
AydinHassan Oct 24, 2026
6102158
Merge pull request #336 from php-school/php-promoted-props
AydinHassan Oct 24, 2026
d9f0d78
Merge pull request #337 from php-school/di-autowire
AydinHassan Oct 24, 2026
1485089
Merge pull request #348 from php-school/async-state
AydinHassan Oct 24, 2026
46bf220
Load admin data with useAsyncState and post forms with useFetch
AydinHassan Oct 24, 2026
1797181
Merge pull request #349 from php-school/vueuse-async
AydinHassan Oct 24, 2026
fd2bc0c
Merge remote-tracking branch 'origin/master' into launch-merge
AydinHassan Oct 24, 2026
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,11 +1,14 @@
MYSQL_HOST=localhost
MYSQL_HOST=db
MYSQL_DATABASE=phpschool
MYSQL_USER=phpschool
MYSQL_PASSWORD=phpschool
SEND_GRID_API_KEY=sendgripapikey
SEND_GRID_SENDER_EMAIL=phpschool.team@gmail.com
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
REDIS_DB=0
28 changes: 28 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: PhpSchool.io

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

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
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
17 changes: 9 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,11 +4,12 @@ on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
branches: [ master, online ]

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
Expand All @@ -17,22 +18,22 @@ jobs:
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
run: composer phpunit -- --stop-on-error

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

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

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

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
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