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

Migrate to ZendFramework to Symfony #66

Draft
wants to merge 174 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
174 commits
Select commit Hold shift + click to select a range
34206ce
#47: Add symfony framework structure and remove phpcas.
adamfranco Sep 19, 2024
baa8acc
Add default .htaccess with `composer require symfony/apache-pack`.
adamfranco Sep 20, 2024
80958b0
#47: Move the Catalogs controller into the Symfony structure.
adamfranco Sep 24, 2024
c9c5d4c
#47: Remove +SymLinksIfOwnerMatch directive that is breaking on tobog…
adamfranco Sep 24, 2024
1021e45
#47: Wire up a new osid.runtime service to access the OSID API.
adamfranco Sep 24, 2024
c3ef1d0
#47: Use PSR-0 autoloading for osid-phpkit.
adamfranco Sep 25, 2024
7dc2c46
#47: Use PSR-0 autoloading for existing code in application/library/
adamfranco Sep 25, 2024
397f6ec
#47: Add symfony/twig-bundle for rendering suppport.
adamfranco Sep 25, 2024
2f817fd
#47: Build out catalog listing template and action.
adamfranco Sep 25, 2024
7d015db
Add Lando config to set up local dev environment.
adamfranco Sep 26, 2024
3a90230
#47: Add PHPUnit as a dev dependency.
adamfranco Sep 26, 2024
3357430
#47: Change the database to mariadb to mirror prod.
adamfranco Sep 26, 2024
8336afc
#47: Convert id-subcomponent separator from '/' to '.'.
adamfranco Sep 27, 2024
4086f33
Add phpmyadmin to local development environment.
adamfranco Sep 27, 2024
2fc1b25
#47: Use pre-existing 'test' database available in local dev environm…
adamfranco Sep 27, 2024
ec5c0fa
#47: Fix Deprecated array access of boolean value error.
adamfranco Sep 27, 2024
93a1767
Provide access to the database for test fixture setup/cleanup.
adamfranco Sep 27, 2024
ed320b8
#47: Update id-subcomponent separators missed in 8336afc9
adamfranco Sep 27, 2024
1980c91
#47: Get the Catalog list working with a redirect to offering search.
adamfranco Sep 27, 2024
7fdc42e
#47: Port the offering view action.
adamfranco Oct 1, 2024
024361b
#47: Add twig extensions to allow building of URLs from osid_Id objects.
adamfranco Oct 1, 2024
77e1356
#47: Ensure that the FSMParser and Harmoni Primitives classes are ava…
adamfranco Oct 1, 2024
df1de2c
#47: Use subdirectories for template files to aid organization.
adamfranco Oct 2, 2024
4cb5999
#47: Add single-section XML view.
adamfranco Oct 3, 2024
f2c7e69
#47: Reorganize offering XML template code into a self-contained part…
adamfranco Oct 3, 2024
2885b60
#47: Reorganize internal methods to the end of the class.
adamfranco Oct 3, 2024
6a202bd
#47: Add single course view.
adamfranco Oct 8, 2024
d1c7415
#47: Add single-course XML view.
adamfranco Oct 8, 2024
c4da8cf
#47: Add course list action.
adamfranco Oct 9, 2024
bfc3eb2
#47: Migrate courses by id XML action.
adamfranco Oct 9, 2024
7d03296
#47: Update courses by id XML action to match values currently in out…
adamfranco Oct 10, 2024
f987c56
#47: Port courses by topic xml action.
adamfranco Oct 10, 2024
3b53795
#47: Ensure that unknown topics don't fully crash the courses-by-topi…
adamfranco Oct 10, 2024
9ac780c
#47: Port the courses/instructorxml endpoint.
adamfranco Oct 10, 2024
72146b2
#47: Improve method documentation.
adamfranco Oct 10, 2024
4d1e7b9
#47: Port the course/searchxml endpoint.
adamfranco Oct 10, 2024
1a2c390
#47: Ensure classes in the global namespace are referenced properly.
adamfranco Oct 10, 2024
fe5769a
#47: Reorganize methods to put routes together. Remove old XML printer.
adamfranco Oct 10, 2024
376a1f8
#47: Complete method documentation.
adamfranco Oct 10, 2024
b86f16a
#47: Initialize all of the types used by offering search in the const…
adamfranco Oct 10, 2024
b9e1adf
#47: Improve helper method documentation for Offerings controller.
adamfranco Oct 10, 2024
d759801
#47: Port offering searchxml endpoint.
adamfranco Oct 10, 2024
7866336
#47: Port course offering search form. Result printing still to do.
adamfranco Oct 11, 2024
05149d3
#47: Port the CourseOffering search page.
adamfranco Oct 15, 2024
df327e5
#47: HTML pages now extend the base.html.twig template.
adamfranco Oct 15, 2024
ea239af
#47: Add the symfony debug pack with profile tools.
adamfranco Oct 15, 2024
d3cc113
#47: Make the symfony console executable.
adamfranco Oct 15, 2024
fe964e3
#47: Add the symfony/asset-mapper component to reference images/CSS/JS.
adamfranco Oct 15, 2024
2b44014
#47: Add jquery & jquery-expander to search results for long descript…
adamfranco Oct 15, 2024
1694994
#47: Add SAML authentication via nbgrp/onelogin-saml-bundle.
adamfranco Oct 16, 2024
41b8231
#47: Fix undefined parameters when search form is loaded without args.
adamfranco Oct 17, 2024
3d55d0a
#47: Migrate bookmarks control, add Doctrine/DBAL for database access.
adamfranco Oct 18, 2024
18101b0
#47: Pass a returnTo parameter through the login flow.
adamfranco Oct 18, 2024
316ce49
#47: Include offerings in course view again.
adamfranco Oct 22, 2024
5c94834
#47: Move helper methods out of the controllers to a new shared service.
adamfranco Oct 22, 2024
2d336ff
#47: Migrate the resource/view action and add support for places.
adamfranco Oct 22, 2024
7502d28
#47: Port /resources/listcampusestxt action.
adamfranco Oct 22, 2024
473627d
#47: Remove action code not used in prod.
adamfranco Oct 22, 2024
e287aa7
#47: Reorganize routes to be first in controller.
adamfranco Oct 22, 2024
1f44b9d
#47: Ensure that /courses/instructorxml/* can accept prefixed or plai…
adamfranco Oct 22, 2024
62ba29a
#47: Port /terms/view/* action.
adamfranco Oct 22, 2024
b96c7e8
#47: Port /terms/list/* action.
adamfranco Oct 22, 2024
8f959da
#47: Port /term/listxml/* action.
adamfranco Oct 22, 2024
95a0b57
#47: Port /terms/details/* and /terms/detailsxml/* actions.
adamfranco Oct 22, 2024
428cff5
#47: Port /offerings/list/* action.
adamfranco Oct 23, 2024
1167d69
#47: Fix whitespace.
adamfranco Oct 23, 2024
c9699b3
#47: Port the /topics/list/* and /topics/view/* actions.
adamfranco Oct 23, 2024
3216762
#47: Add missing closing </div> in bookmarks control.
adamfranco Oct 23, 2024
0b8e665
Merge branch 'master' into symfony-47
adamfranco Oct 23, 2024
433d1c2
#47: Port the /topics/listxml/* action.
adamfranco Oct 23, 2024
720cfd9
#47: Port the /topics/recent/* and /topics/recentxml/* actions.
adamfranco Oct 23, 2024
65f83f7
#47: Port /topics/viewxml/* action.
adamfranco Oct 24, 2024
fa3b25d
#47: Port /topics/list*txt actions.
adamfranco Oct 24, 2024
55d324a
#47: Be more specific about types.
adamfranco Oct 24, 2024
2c56e0e
#47: Port the /catalogs/listxml action.
adamfranco Oct 24, 2024
ae1c678
#47: Port the /catalogs/viewxml/* action.
adamfranco Oct 24, 2024
6cafced
#47: Use a base.xml.twig for RSS structure.
adamfranco Oct 24, 2024
86e7c07
#47: Ensure that the catalog_id is passed into view_topic URLs.
adamfranco Oct 24, 2024
4b43ee5
#47: Fix template after data was reorganized.
adamfranco Oct 24, 2024
f4a0600
#47: Add some basic sanity checks of URLs based on Midd data.
adamfranco Oct 24, 2024
0bc37bc
#47: Redirect blind requests to /favicon.ico to the asset path.
adamfranco Oct 29, 2024
85d2812
#47: require php-cs-fixer in --dev rather than relying on global install
adamfranco Oct 29, 2024
6d89395
#47: Run php-cs-fixer to match Symfony coding standards.
adamfranco Oct 29, 2024
c6b0d9a
#47: Update to short constructor syntax and remove unneeded verbosity.
adamfranco Oct 29, 2024
09d25e2
#47: Set list_catalogs as the root route.
adamfranco Oct 29, 2024
c9b6b7b
#47: Osid Ids now be used instead of strings in routing/URLs/Controll…
adamfranco Oct 30, 2024
d35c17a
#47: Update additional controller type hinting missed in c9b6b7b9.
adamfranco Oct 30, 2024
8297339
#47: Normalize osid id arguments to be $xxxId for clarity.
adamfranco Oct 30, 2024
45a9fed
#47: Convert additional controller arguments to Osid_id_Id objects.
adamfranco Oct 30, 2024
b307e73
#47: Fix code formatting with php-cs-fixer.
adamfranco Oct 30, 2024
6658f00
#47: Ensure that variadic parameters are passed through to the inner …
adamfranco Oct 31, 2024
1181797
#47: Add first WebTestCase to test full application requests via phpu…
adamfranco Oct 31, 2024
31251ad
#47: Require a catalog for /courses/list/* to avoid massive data fetch.
adamfranco Oct 31, 2024
145c011
#47: Add additional acceptance tests for catalogs and courses control…
adamfranco Oct 31, 2024
4775156
#47: Recent Terms/Courses helpers use a date other than 'now' while t…
adamfranco Nov 1, 2024
9b45edb
#47: Fix array-access warnings when results are empty.
adamfranco Nov 1, 2024
12384dd
#47: Fix notices when keywords is null.
adamfranco Nov 1, 2024
78ada2b
#47: Fix deprecation notices due to parent specifying mixed return type.
adamfranco Nov 1, 2024
93c477a
#47: For recent courses, clone the ref date as it gets modified by su…
adamfranco Nov 1, 2024
5d91cf9
#47: Recency evaluation needs to happen after interval is set.
adamfranco Nov 1, 2024
e081d85
#47: Run `php-cs-fixer fix` for code formatting.
adamfranco Nov 1, 2024
5430194
#47: Add additional Courses Controller tests.
adamfranco Nov 1, 2024
6272cf6
#47: Test /courses/instructorxml with a catalog where they teach noth…
adamfranco Nov 1, 2024
361ffe2
#47: Migrate Id helper tests.
adamfranco Nov 1, 2024
f12b11f
#47: Port remaining application service tests.
adamfranco Nov 1, 2024
b07ea2c
#47: Test type serialization and fix argument order.
adamfranco Nov 1, 2024
6f3f4b1
#47: Fix missing parameter notices.
adamfranco Nov 1, 2024
6e4f772
#47: Use symfony_test as the test name to align with Doctrine.
adamfranco Nov 1, 2024
2adb019
#47: Create the non-banner test tables and tests for Bookmarks Contro…
adamfranco Nov 1, 2024
38b871b
#47: Run `php-cs-fixer fix` for coding style.
adamfranco Nov 1, 2024
9610d86
#47: Add Offerings controller tests.
adamfranco Nov 1, 2024
6ff87e1
#47: Fix missing parameter when searching for offerings in any term.
adamfranco Nov 1, 2024
f451da7
#47: Ensure that variables the template is expecting are set.
adamfranco Nov 1, 2024
1f61c77
#47: Get apc tests running again after recent test-harness changes.
adamfranco Nov 1, 2024
493ebd4
#47: Add Resources Controller tests and remove unused arguments.
adamfranco Nov 4, 2024
6d47e4e
#47: Add Terms controller test and ensure that 404s are used for not …
adamfranco Nov 4, 2024
a89c661
#47: Add Topics controller tests, ensure 404s, and remove non-phpunit…
adamfranco Nov 4, 2024
367f567
#47: Add Redirects Controller tests.
adamfranco Nov 4, 2024
9bf61ea
#47: First pass porting the Schedule builder UI.
adamfranco Nov 14, 2024
369af20
#47: Remove the jquery-week-calendar library, hasn't been updated in …
adamfranco Nov 14, 2024
47b058d
#47: Add a static copy of jquery-ui 1.14.1 for schedule dialogs.
adamfranco Nov 14, 2024
4b6704c
#47: Get section additions to schedule working.
adamfranco Nov 14, 2024
9ccf6d6
#47: Port schedule builder styles and fix dialog positioning.
adamfranco Nov 14, 2024
d049735
#47: Port print schedule view using toast-ui calendar for rendering.
adamfranco Nov 15, 2024
b557b30
#47: Add tests for the Schedules controller.
adamfranco Nov 18, 2024
237d16e
#47: Fix 'Doctrine\DBAL\Statement::execute() is deprecated' notices.
adamfranco Nov 18, 2024
8d2e850
#47: Consolidate routes at the top of the Schedules Controller.
adamfranco Nov 18, 2024
cc2c45a
#47: Upgrade mariadb version.
adamfranco Nov 19, 2024
82ec7a3
#47: Update to the latest version of the oracle instantclient.
adamfranco Nov 19, 2024
2585037
#47: Port schedule email sending to use symfony/mailer.
adamfranco Nov 19, 2024
5e72c50
#47: Fix code formatting with `vendor/bin/php-cs-fixer fix`
adamfranco Nov 19, 2024
0651c65
#47: Add tests for email sending.
adamfranco Nov 19, 2024
908073a
#47: Delete many helpers and classes that are already ported and not …
adamfranco Nov 19, 2024
6eff58d
#47: Remove additional unneeded code.
adamfranco Nov 20, 2024
8f0b2f7
#47: Remove unneeded service tags that are autoconfigured.
adamfranco Nov 20, 2024
ce1e325
#47: Convert common uncaught osid exceptions to HTTP exceptions centr…
adamfranco Nov 20, 2024
e4d4b9f
#47: Initial port of commands for syncing from Banner.
adamfranco Nov 21, 2024
4e7b814
#47: Clean up script names.
adamfranco Nov 22, 2024
6688acc
#47: Fix code formatting with php-cs-fixer
adamfranco Nov 25, 2024
be649d3
#47: Add strict typing to CatalogSync classes.
adamfranco Nov 25, 2024
f61aacf
#47: Fix exception handling in sync from Banner director.
adamfranco Nov 25, 2024
f1d6a9e
#47: Use the Symfony Mailer service for emailing error messages.
adamfranco Nov 25, 2024
3fdd493
#47: Use console output for catalog sync status lines.
adamfranco Nov 25, 2024
f4a4f51
#47: Don't duplicate properties being passed to the parent class.
adamfranco Nov 25, 2024
b29b40e
#47: Pass $allowedBlckCodes to the syncer.
adamfranco Nov 25, 2024
5ec4543
#47: Let SYNC_ALLOWED_BLOCK_CODES to be configured in .env.
adamfranco Nov 25, 2024
c0237f3
#47: Can now configure different sync strategies.
adamfranco Nov 25, 2024
ba107c4
#47: Add a proxied hostname for easy access to phpmyadmin in dev.
adamfranco Dec 2, 2024
167376b
#47: Fix variable name missed previously.
adamfranco Dec 2, 2024
1293fb6
#47: Copy over admin controller and index action.
adamfranco Dec 2, 2024
550ad5e
#47: Assign user roles via SAML claims.
adamfranco Dec 2, 2024
378d297
#47: Port the term visibility management actions.
adamfranco Dec 2, 2024
f2fff05
#47: Add tests for term visibility admin.
adamfranco Dec 2, 2024
527b9b6
#47: Fix tests to work with role change from 550ad5e9
adamfranco Dec 2, 2024
3988358
#47: Pull the term visibility administration code into its own contro…
adamfranco Dec 3, 2024
59cf681
#47: Move Antirequisite and Export configs to their own controllers.
adamfranco Dec 3, 2024
9f7c449
#47: Port description markup testing tool.
adamfranco Dec 3, 2024
c2bebda
#47: Port admin antirequisites screen and add tests.
adamfranco Dec 3, 2024
8f3d42f
#47: Port the masquerade action.
adamfranco Dec 4, 2024
a0afb05
#47: Initial stage of porting the Export system. Config edit screen l…
adamfranco Dec 16, 2024
775bf21
#47: Port export configuration diff view.
adamfranco Dec 19, 2024
2d33158
#47: Port the revision JSON view action.
adamfranco Dec 19, 2024
3bf5472
#47: Port export config revert actions.
adamfranco Dec 19, 2024
36cc918
#47: Fix reset button in export config UI.
adamfranco Dec 19, 2024
a5766fb
#47: Run Prittier on all Javascripts to clean up code formatting.
adamfranco Dec 19, 2024
c329e19
#47: Creating new export configurations now works.
adamfranco Dec 20, 2024
a1aeaac
#47: Can now delete export configurations.
adamfranco Dec 20, 2024
6a1f008
#47: Fix error when re-selecting the prompt.
adamfranco Dec 20, 2024
aec8771
#47: Rename template into export directory for consistency.
adamfranco Dec 20, 2024
0656722
#47: Split export config management & scheduling into separate contro…
adamfranco Dec 20, 2024
94d3942
#47: Reorganize and rename export configuration routes for consistency.
adamfranco Dec 20, 2024
620fa40
#47: Add CSRF keys to export form submission actions.
adamfranco Dec 20, 2024
e495c61
#47: Fix deprecation notice for query().
adamfranco Dec 20, 2024
c169d84
#47: Add unit tests for Export configuration actions.
adamfranco Dec 20, 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
  •  
  •  
  •  
83 changes: 83 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# In all environments, the following files are loaded if they exist,
# the latter taking precedence over the former:
#
# * .env contains default values for the environment variables needed by the app
# * .env.local uncommitted file with local overrides
# * .env.$APP_ENV committed environment-specific defaults
# * .env.$APP_ENV.local uncommitted environment-specific overrides
#
# Real environment variables win over .env files.
#
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
# https://symfony.com/doc/current/configuration/secrets.html
#
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration

# Saml Authentication
SAML_IDP_ENTITYID="https://idp.example.edu/abc123"
SAML_IDP_SINGLESIGNONSERVICE="https://idp.example.edu/abc123/saml2"
SAML_IDP_SINGLELOGOUTSERVICE="https://idp.example.edu/abc123/saml2"
SAML_IDP_X509CERT="MIIC...."

# Catalog
CATALOG_BANNER_WEB_URL=""

# Schedules
SCHEDULES_EMAIL_ENABLED=false
SCHEDULES_EMAIL_SEND_MAIL_AS_USER=false
[email protected]
SCHEDULES_IMAGE_FONT_FILE=/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf

# Sync
SYNC_ERROR_MAIL_TO="[email protected]"
SYNC_ERROR_MAIL_FROM="[email protected]"
# A JSON encoded array of Block Codes that should be exposed to users.
SYNC_ALLOWED_BLOCK_CODES='["CC"]'
# Sync destination (this application's database)
SYNC_DESTINATION_DSN="mysql:host=database;port=3306;dbname=symfony;charset=utf8mb4"
SYNC_DESTINATION_USERNAME=symfony
SYNC_DESTINATION_PASSWORD=symfony
# The sync strategy to use. One of the following:
# 'sync.strategy.oci'
# 'sync.strategy.oci_with_cache'
# 'sync.strategy.pdo_msyql'
# Depending on which strategy is chosen, different additional parameters (below)
# need to be configured.
SYNC_STRATEGY='sync.strategy.oci'
# Sync source (using an Oracle connection) for Oci & OciWithCache sync strategies.
SYNC_SOURCE_OCI_TNS="(DESCRIPTION = (ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = reporting-database-prod.ec.example.edu)(PORT = 8000))) (CONNECT_DATA = (SID = SNAPSHOT)))"
SYNC_SOURCE_OCI_USERNAME=""
SYNC_SOURCE_OCI_PASSWORD=""
# Temporary Mysql/Mariadb database if using (OciWithCache) sync strategy.
SYNC_TEMP_DSN="mysql:host=database;port=3306;dbname=catalog_temp;charset=utf8mb4"
SYNC_TEMP_USERNAME=symfony
SYNC_TEMP_PASSWORD=symfony
# The OciWithCache sync strategy copies into the live database with
# mysqldump & mysql commands. If these are at different paths/names, then
#customize them.
SYNC_MYSQL_COMMAND=mysql
SYNC_MYSQLDUMP_COMMAND=mysqldump
# The PdoMysql sync strategy reads from a Mysql/Mariadb connection.
SYNC_SOURCE_PDOMYSQL_DSN="mysql:host=database;port=3306;dbname=catalog_temp;charset=utf8mb4"
SYNC_SOURCE_PDOMYSQL_USERNAME=symfony
SYNC_SOURCE_PDOMYSQL_PASSWORD=symfony

###> symfony/framework-bundle ###
APP_ENV=dev
APP_SECRET=af0c5e8cb62edd2dd690260da18618a2
###< symfony/framework-bundle ###

###> doctrine/doctrine-bundle ###
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
#
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
# DATABASE_URL="mysql://app:[email protected]:3306/app?serverVersion=8.0.32&charset=utf8mb4"
DATABASE_URL="mysql://symfony:symfony@database:3306/symfony?serverVersion=10.3.27-MariaDB&charset=utf8mb4"
# DATABASE_URL="postgresql://app:[email protected]:5432/app?serverVersion=16&charset=utf8"
###< doctrine/doctrine-bundle ###

###> symfony/mailer ###
MAILER_DSN=null://null
###< symfony/mailer ###
7 changes: 7 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# define your env variables for the test env here
KERNEL_CLASS='App\Kernel'
APP_SECRET='$ecretf0rt3st'
SYMFONY_DEPRECATIONS_HELPER=999999
PANTHER_APP_ENV=panther
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
SCHEDULES_EMAIL_ENABLED=true
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,32 @@ progress.txt
vendor/
.phpunit.result.cache
.php-cs-fixer.cache

###> symfony/framework-bundle ###
/.env.local
/.env.local.php
/.env.*.local
/config/secrets/prod/prod.decrypt.private.php
/public/bundles/
/var/
/vendor/
###< symfony/framework-bundle ###

###> symfony/phpunit-bridge ###
.phpunit.result.cache
/phpunit.xml
###< symfony/phpunit-bridge ###

###> phpunit/phpunit ###
/phpunit.xml
.phpunit.result.cache
###< phpunit/phpunit ###

###> symfony/asset-mapper ###
/public/assets/
/assets/vendor/
###< symfony/asset-mapper ###
###> friendsofphp/php-cs-fixer ###
/.php-cs-fixer.php
/.php-cs-fixer.cache
###< friendsofphp/php-cs-fixer ###
7 changes: 0 additions & 7 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,3 @@
[submodule "library/lazy_sessions"]
path = library/lazy_sessions
url = https://github.com/middlebury/lazy_sessions.git
[submodule "docroot/javascript/jquery-week-calendar"]
path = docroot/javascript/jquery-week-calendar
url = https://github.com/themouette/jquery-week-calendar.git
[submodule "library/jsdifflib"]
path = library/jsdifflib
url = https://github.com/cemerick/jsdifflib.git
branch = master
74 changes: 74 additions & 0 deletions .lando.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: coursecatalog
recipe: symfony
config:
webroot: public
php: 8.1
database: mariadb:10.11
services:
appserver:
build_as_root:
- apt update
- mkdir /opt/oracle
- rm -Rf /opt/oracle/*
# Fetch binaries directly from Oracle:
# https://www.oracle.com/database/technologies/instant-client/downloads.html
- curl https://download.oracle.com/otn_software/linux/instantclient/instantclient-basic-linux-arm64.zip > /opt/oracle/instantclient-basic.zip
- curl https://download.oracle.com/otn_software/linux/instantclient/instantclient-sdk-linux-arm64.zip > /opt/oracle/instantclient-sdk.zip
# Unzip
- unzip -o /opt/oracle/instantclient-basic.zip -d /opt/oracle
- unzip -o /opt/oracle/instantclient-sdk.zip -d /opt/oracle
# Add sqlplus command line Oracle client for debugging.
- curl https://download.oracle.com/otn_software/linux/instantclient/instantclient-sqlplus-linux-arm64.zip > /opt/oracle/instantclient-sqlplus.zip
- unzip -o /opt/oracle/instantclient-sqlplus.zip -d /opt/oracle
# Delete all of our downloads.
- rm /opt/oracle/*.zip
# Make a symlink to the versioned directory.
- ln -s /opt/oracle/instantclient_* /opt/oracle/instantclient
# Make OS aware of newly installed libraries
- echo /opt/oracle/instantclient > /etc/ld.so.conf.d/oracle-instantclient.conf
- ldconfig -v
# Set the interpreter for the Oracle command-line tools.
# See: https://askubuntu.com/questions/1397724/no-such-file-or-directory-when-running-sqlplus-command
# This is not needed for the Oci8 PHP extension itself, but is needed to
# get sqlplus command-line Oracle client working for debugging.
- apt -y install patchelf
- patchelf --set-interpreter /lib/ld-linux-aarch64.so.1 /opt/oracle/instantclient/adrci
- patchelf --set-interpreter /lib/ld-linux-aarch64.so.1 /opt/oracle/instantclient/genezi
- patchelf --set-interpreter /lib/ld-linux-aarch64.so.1 /opt/oracle/instantclient/sqlplus
- patchelf --set-interpreter /lib/ld-linux-aarch64.so.1 /opt/oracle/instantclient/uidrvci
# Install libaio1 -- when missing was preventing the extension from loading.
- apt install libaio1
# Install and enable OCI8
- echo "instantclient,/opt/oracle/instantclient" | pecl install oci8-3.2.1
- docker-php-ext-enable oci8
overrides:
environment:
MAILER_DSN: smtp://mailpit:1025
phpmyadmin:
type: phpmyadmin
hosts:
- database
mailpit:
scanner: false
api: 3
type: lando
services:
image: axllent/mailpit
volumes:
- mailpit:/data
ports:
- 8025 # Web UI.
- 1025 # SMTP.
environment:
MP_MAX_MESSAGES: 5000
MP_DATA_FILE: /data/mailpit.db
MP_SMTP_AUTH_ACCEPT_ANY: 1
MP_SMTP_AUTH_ALLOW_INSECURE: 1
command: '/mailpit'
volumes:
mailpit:
proxy:
mailpit:
- mail.coursecatalog.lndo.site:8025
phpmyadmin:
- phpmyadmin.coursecatalog.lndo.site
2 changes: 2 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
->notPath([
'vendor',
'#^library#',
'#^application/library/harmoni/Primitives/Collections-Text/SafeHTML/classes/HTMLSax3#',
'#^var#',
])
;

Expand Down
42 changes: 33 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ Examples

Examples of the the Course-Catalog in action at <a href="http://www.middlebury.edu">Middlebury College</a>:

* [Main Search UI](https://catalog.middlebury.edu/catalogs/view/catalog/catalog%2FMCUG) (catalog app)
* [Section Details Page](https://catalog.middlebury.edu/offerings/view/catalog/catalog%2FMCUG/offering/section%2F201090%2F91241) (catalog app)
* [Department "courses" RSS feed](https://catalog.middlebury.edu/courses/topicxml/catalog/catalog%2FMCUG/topic/topic%2Fdepartment%2FBIOL) (catalog app)
* [Departments listing to feed to the Drupal content type form](https://catalog.middlebury.edu/topics/listdepartmentstxt/catalog/catalog%2FMCUG/) (catalog app)
* [Main Search UI](https://catalog.middlebury.edu/catalogs/view/catalog/catalog.MCUG) (catalog app)
* [Section Details Page](https://catalog.middlebury.edu/offerings/view/catalog/catalog.MCUG/offering/section.201090.91241) (catalog app)
* [Department "courses" RSS feed](https://catalog.middlebury.edu/courses/topicxml/catalog/catalog.MCUG/topic/topic.department.BIOL) (catalog app)
* [Departments listing to feed to the Drupal content type form](https://catalog.middlebury.edu/topics/listdepartmentstxt/catalog/catalog.MCUG/) (catalog app)
* [Department Course Listing](http://www.middlebury.edu/academics/bio/courses) (Drupal "courses" content-type displaying a feed from the catalog app)
* [Department Section Listing](http://www.middlebury.edu/academics/bio/courses/offerings) (Drupal "courses" content-type displaying a feed from the catalog app)
* [Faculty Profile](http://www.middlebury.edu/academics/bio/faculty/node/48111) (Drupal "profile" content-type displaying a feed from the catalog app)</li>
Expand All @@ -39,16 +39,40 @@ These instructions assume that you have a POSIX machine running Apache with PHP
cd coursecatalog
git-submodule update --init --recursive
```
3. Make a symbolic link to the `coursecatalog/docroot/` directory in a web-accessible directory or add a virtualhost rooted in the `coursecatalog/docroot/` directory.
4. Create a MySQL database for the catalogs data and a cache of Banner data.
5. Make copies of the example config files at `configuration.plist`, `frontend_config.ini`, and `update_config.ini` and edit values to match your environment.
6. Create the database tables defined in `application/library/banner/course/sql/table_creation.sql`
7. Run the script at `bin/update-from-banner.php` to dump Banner data into the the MySQL database:
3. Install additional dependencies with Composer:
```
composer install
```
4. Make a symbolic link to the `coursecatalog/docroot/` directory in a web-accessible directory or add a virtualhost rooted in the `coursecatalog/docroot/` directory.
5. Create a MySQL database for the catalogs data and a cache of Banner data.
6. Make copies of the example config files at `configuration.plist`, `frontend_config.ini`, and `update_config.ini` and edit values to match your environment.
7. Create the database tables defined in `application/library/banner/course/sql/table_creation.sql`
8. Run the script at `bin/update-from-banner.php` to dump Banner data into the the MySQL database:
```
php bin/update-from-banner.php
php bin/build_indices.php
```

## Development environment setup

### Lando
Install Docker and Lando to provide a local containerized environment

In the code directory, start the local containers with `lando start`

### Copying the production database
Dump the production database to a non version-controlled file path like `var/catalog_prod.sql`.

Strip out any `DEFINER` statements that will break the import:
```
sed -i '' 's/DEFINER=[^*]*\*/\*/g' var/catalog_prod.sql
```

Import the database into the local container:
```
lando db-import var/catalog_prod.sql
```

Unit Tests
----------

Expand Down
27 changes: 0 additions & 27 deletions application/autoload.php

This file was deleted.

Loading