https://github.com/itk-dev/azure-ad-delta-sync-drupal
Drupal module for Azure AD Delta Sync
https://github.com/itk-dev/azure-ad-delta-sync-drupal
ad-delta-sync drupal drupal-module php
Last synced: 27 days ago
JSON representation
Drupal module for Azure AD Delta Sync
- Host: GitHub
- URL: https://github.com/itk-dev/azure-ad-delta-sync-drupal
- Owner: itk-dev
- License: mit
- Created: 2021-07-05T10:26:57.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-05-06T12:27:22.000Z (11 months ago)
- Last Synced: 2025-10-30T21:57:45.409Z (5 months ago)
- Topics: ad-delta-sync, drupal, drupal-module, php
- Language: PHP
- Homepage:
- Size: 157 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Azure AD Delta Sync for Drupal
Drupal module for [Azure AD Delta Sync](https://github.com/itk-dev/azure-ad-delta-sync).
## Installation
```sh
composer require itk-dev/azure_ad_delta_sync
vendor/bin/drush pm:enable azure_ad_delta_sync
```
Go to `/admin/config/azure_ad_delta_sync` to set up the module.
You will probably want to add Azure api keys in `settings.local.php`, i.e.
```php
# settings.local.php
$config['azure_ad_delta_sync.settings']['azure']['uri'] = '…';
$config['azure_ad_delta_sync.settings']['azure']['security_key'] = '…';
$config['azure_ad_delta_sync.settings']['azure']['client_secret'] = '…';
```
Furthermore, you may want to install the [Config Ignore](https://www.drupal.org/project/config_ignore) module and ignore
the `azure_ad_delta_sync.settings` config if committing config to a version control system.
## Usage
A cron job should run the following command at regular intervals:
```sh
vendor/bin/drush azure_ad_delta_sync:run --force
```
Run `vendor/bin/drush azure_ad_delta_sync:run --help` for details on the command.
## Development
For development you need a full Drupal project. See
[itk-dev/azure-ad-delta-sync-drupal-test](https://github.com/itk-dev/azure-ad-delta-sync-drupal-test) for an example.
We use lazy services, `aDrupal\azure_ad_delta_sync\UserManager` and `Drupal\azure_ad_delta_sync\Controller`, which
require generating proxy classes (cf. ).
Run the following command to update the proxy classes:
```sh
./scripts/generate-proxy-classes
```
## Automated tests
Requires a full Drupal installation with the `azure_ad_delta_sync_drupal` module in the `web/modules/contrib` folder.
```sh
(cd «DRUPAL_ROOT»/web; ./vendor/bin/phpunit modules/contrib/azure_ad_delta_sync_drupal/tests/src/Functional)
```
### Coding standards
The code follows the [Drupal Coding Standards](https://www.drupal.org/docs/develop/standards) (cf.
[`phpcs.xml.dist`](phpcs.xml.dist)) and can be checked by running
```sh
composer install
composer coding-standards-check
```
Use
```sh
composer coding-standards-apply
```
to automatically fix some coding standard violations.
#### Markdown files
```shell
docker run --rm --volume "$PWD:/md" peterdavehello/markdownlint markdownlint '**/*.md' --fix
docker run --rm --volume "$PWD:/md" peterdavehello/markdownlint markdownlint '**/*.md'
```
### Code analysis
phpstan is used to perform static analysis of the code. Run the following script:
```sh
./scripts/code-analysis
```
### Rector
Automatic code upgrades
`./scripts/rector`
### GitHub Actions
We use [GitHub Actions](https://github.com/features/actions) to check coding standards, perform code analysis and run
automated tests whenever a pull request is made (cf. [`.github/workflows/pr.yaml`](.github/workflows/pr.yaml)).
Before making a pull request you can run the GitHub Actions locally to check for any problems:
[Install `act`](https://github.com/nektos/act#installation) and run
```sh
act -P ubuntu-latest=shivammathur/node:focal pull_request
```
(cf. ).