Skip to content

Commit

Permalink
Backport MOODLE_39_STABLE to new TOTARA_13_STABLE
Browse files Browse the repository at this point in the history
  • Loading branch information
x-iy committed Nov 15, 2023
2 parents 03bcaba + 8fa4086 commit 63daa50
Show file tree
Hide file tree
Showing 5,826 changed files with 599,447 additions and 280,031 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
75 changes: 27 additions & 48 deletions .extlib/simplesamlphp/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,13 @@
# Contribution guidelines

**SimpleSAMLphp welcomes all contributions**. It is impossible to make a product like this without the efforts of many people, so please don't be shy and share your help with us. Even the tiniest contribution can make a difference!

These guidelines briefly explain how to contribute to SimpleSAMLphp effectively and consistently, making sure to keep high quality standards and making it easier for you to contribute.

<!-- {{TOC}} -->

## Team members
Currently, the core team members are:

* Jaime Pérez Crespo, *maintainer and main developer*, UNINETT <[email protected]>
* Tim van Dijen, *main developer*
* Thijs Kinkhorst, *main developer*

Two other persons are listed here for historical reasons, even though they are no longer involved in the project:

* Andreas Åkre Solberg, *architect and original developer*, UNINETT <[email protected]>
* Olav Morken, *architect and main developer*, UNINETT <[email protected]>

We have been lucky enough to have so many people help us through the years. SimpleSAMLphp wouldn't have reached so far without them. We want to thank them from here, but unfortunately they are so many it is nearly impossible to mention all of them. [Here is a Github page that summarizes everyone's contributions](https://github.com/simplesamlphp/simplesamlphp/graphs/contributors?from=2007-09-09&to=2015-09-06&type=c).

***Big thanks to you all!***
[TOC]

## First things first

Before embarking yourself in a contribution, please make sure you are familiar with the way SimpleSAMLphp is written, the way it works, and what is required or not.

* Make sure to read [the documentation](https://simplesamlphp.org/docs/stable/). If you use the search engine in the website, please verify that you are reading the latest stable version. If you want to make a change, check [the development branch of the documentation](https://simplesamlphp.org/docs/development/).
Expand All @@ -30,39 +16,45 @@ Before embarking yourself in a contribution, please make sure you are familiar w
* If you think you have discovered a bug, please check the [issue tracker](https://github.com/simplesamlphp/simplesamlphp/issues) and the [pull requests](https://github.com/simplesamlphp/simplesamlphp/pulls) to verify it hasn't been reported already.

## Contributing code

New features are always welcome, provided they will be useful to someone apart from yourself. Please take a look at the [list of issues](https://github.com/simplesamlphp/simplesamlphp/issues) to see what people are asking for. Our [roadmap](https://simplesamlphp.org/releaseplan) might also be a good place to start if you do not know exactly how you can contribute.

When submitting a pull request, please make sure to account for:

### Coding standards

* Respect the coding standards. We try to comply with PHP's [PSR-12](http://www.php-fig.org/psr/psr-12/). Pay special attention to the rules below:
* Lines should not be longer than 80 characters.
* Use **4 spaces** instead of tabs.
* Keep the keywords in **lowercase**, including `true`, `false` and `null`.
* Make sure your classes work with *autoloading*.
* Never include a trailing `?>` in your files.
* The first line of every file must be `<?php`.
* Use namespaces if you are adding new files.
* Lines should not be longer than 80 characters.
* Use **4 spaces** instead of tabs.
* Keep the keywords in **lowercase**, including `true`, `false` and `null`.
* Make sure your classes work with *autoloading*.
* Never include a trailing `?>` in your files.
* The first line of every file must be `<?php`.
* Use namespaces if you are adding new files.
* Do not include too many changes in every commit. Commits should be focused and address one single problem or feature. By having **multiple, small commits** instead of fewer large ones, it is easier to track what you are doing, revert changes in case of an error and help you make changes if needed.
* Try to write clean **commit messages**, largely based on the [seven rules](http://chris.beams.io/posts/git-commit/):
* Write a **short** subject line, followed by a blank line and a longer explanation.
* Prefix the subject line with the component(s) changed, e.g. "docs: Update foo", or "SAML: Don't log bar twice", or "tests: Add tests for quux".
* Explain **what and why** in the commit message, not just _how_. Things that seem obvious now might become quite confusing when rediscovered years later.
* Write a **short** subject line, followed by a blank line and a longer explanation.
* Prefix the subject line with the component(s) changed, e.g. "docs: Update foo", or "SAML: Don't log bar twice", or "tests: Add tests for quux".
* Explain **what and why** in the commit message, not just **how**. Things that seem obvious now might become quite confusing when rediscovered years later.

### Comments, comparisons, and simplicity

* Add comments that describe why/how your code works.
* Include complete **phpdoc** documentation for every property and method you add. If you change a method or property, make sure to update the existing *phpdoc* accordingly. Do not forget to document all parameters, returned values and exceptions thrown.
* Use strict comparison operators like `===` and check for specific values when writing tests.
* Avoid big functions, long nested loops or `if` statements.
* Try to keep **backwards-compatibility**. Code that breaks current configurations and installations is difficult to deploy, and therefore we try to avoid that as much as possible.

### Unit tests

Add **unit tests** to verify that your code not only works but also keeps working over time. When adding tests, keep the same directory structure used for regular classes. Try to cover **all your code** with tests. The bigger the test coverage, the more reliable and better our library is. Read our [guidelines](TESTING.md) to learn more about tests.

### Documentation

In order to keep this library user-friendly, we ask that you add proper **documentation** explaining how to use your new feature or how your code changes things.

### Pull requests

Please follow all instructions below:

1. Submit your code as a **pull request** in github from a branch with a descriptive name in your own fork of the repository.
Expand All @@ -72,6 +64,7 @@ Please follow all instructions below:
Sometimes it can take a long time before we are able to process your pull requests. Do not get discouraged, we will eventually reach your change. Remember that by following these guidelines, you are making it easier for us to analyze your request so the process will be smooth and fast. We really appreciate you helping us out, not only with your code, but also by following these guidelines.

## Reporting bugs

Before reporting a bug, please make sure it is indeed a bug. Check [the documentation](https://simplesamlphp.org/docs/stable/) to verify what the intended behaviour is. Review the [issue tracker](https://github.com/simplesamlphp/simplesamlphp/issues) and the [pull requests](https://github.com/simplesamlphp/simplesamlphp/pulls) to see if someone has already reported the same issue.

If you are able, a pull request is much more appreciated than just a new issue. If not, please do not hesitate to open one. It is better to have just an issue report than nothing!
Expand All @@ -86,37 +79,23 @@ You can help us diagnose and fix bugs by asking and providing answers to the fol
* Is this a security issue? If so, how severe is it? How can an attacker exploit it? Read more about security issues in the next section.

## Reporting vulnerabilities
In case you find a vulnerability in SimpleSAMLphp, or you want to confirm a possible security issue in the software, please get in touch with us through [UNINETT's CERT team](https://www.uninett.no/cert). Please use our PGP public key to encrypt any possibly sensitive data that you may need to submit. We will get back to you as soon as possible according to our working hours in Central European Time.

When reporting a security issue, please add as much information as possible to help us identify, confirm, replicate and fix the problem. In particular, remember to include the following information in your report:

* The version or versions of SimpleSAMLphp affected.
* An exact version that can be used to replicate the issue.
* Any module or modules involved in the issue.
* Any particular configuration details relevant to the setup affected.
* A detailed description and a clear and concise, step-by-step guide to allow us reproduce the issue.
* Screenshots, videos, or any other media that would help identify the issue.
* Pointers to the exact line or lines in the code where the vulnerability is supposed to be.
* Context on how you discovered the issue.
* Your own name and whether you want to be credited for the discovery or not.

Please **DO NOT** report security incidents related to systems that use SimpleSAMLphp, where this software is not the cause of the incident. Issues related to the use (or misuse) of infrastructure, misconfiguration of the software, malfunction of a particular system or user-related errors should not be reported either. If you are using SimpleSAMLphp to authenticate or login to services, but you don't know what SimpleSAMLphp is or you are not sure about the nature of the issue, please contact the organization running the service for you.

Finally, be reasonable. We'll do our best to resolve the issue according to our principles of security and transparency. Every confirmed vulnerability will be published and resolved in a timely manner. All we ask in return is that you contact us privately first in order to avoid any potential damage to those using the software.

You can find the list of security advisories we have published [here](https://simplesamlphp.org/security).
Please see [SECURITY.md](SECURITY.md) for how to report security vulnerabilities. Please do *not* use the public issue tracker.

## Translations
SimpleSAMLphp is translated to many languages, though it needs constant updates from translators, as well as new translations to other languages. For the moment, translations can be contributed as **pull requests**. We are looking at better ways to translate the software that would make your life easier, so stay tuned! You can also join the [translators mailing list](http://groups.google.com/group/simplesamlphp-translation) to keep up to date on the latest news.

SimpleSAMLphp is translated to many languages, though it needs constant updates from translators, as well as new translations to other languages. For the moment, translations can be contributed as **pull requests**.

Before starting a new translation, decide what style you want to use, whether you want to address the user in a polite manner or not, etc. Be coherent and keep that style through all your translations. If there is already a translation and you want to complete it, make sure to keep the same style used by your fellow translators.

## Documentation
Did you find a typo in the documentation? Does something make no sense? Did we use poor english? Tell us!
## Documentation improvements

Did you find a typo in the documentation? Does something make no sense? Did we use poor English? Tell us!

Documentation is included in our own repository in *markdown* format. You can submit pull requests with fixes. If you encounter some feature that is not documented, or the documentation does not reflect the real behaviour of the library, please do not hesitate to open an issue.

Good documentation is key to make things easier for our users!

## Community

You do not feel capable of contributing with your code, but are using SimpleSAMLphp and can share your knowledge and experience? Please, do so! Join our [users mailing list](http://groups.google.com/group/simplesamlphp) and help other users when you can. Your experience might be valuable for many!
2 changes: 1 addition & 1 deletion .extlib/simplesamlphp/COPYING
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2007-2021 UNINETT AS, https://www.uninett.no
Copyright 2007-2020 UNINETT AS, 2021-2023 SimpleSAMLphp

SimpleSAMLphp is licensed under the CC-GNU LGPL version 2.1.
http://creativecommons.org/licenses/LGPL/2.1/
Expand Down
9 changes: 5 additions & 4 deletions .extlib/simplesamlphp/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
SimpleSAMLphp
=============
[![Build Status](https://travis-ci.org/simplesamlphp/simplesamlphp.svg?branch=master)](https://travis-ci.org/simplesamlphp/simplesamlphp)
# SimpleSAMLphp

![Build Status](https://github.com/simplesamlphp/simplesamlphp/workflows/CI/badge.svg?branch=master)
[![Coverage Status](https://codecov.io/gh/simplesamlphp/simplesamlphp/branch/master/graph/badge.svg)](https://codecov.io/gh/simplesamlphp/simplesamlphp)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/simplesamlphp/simplesamlphp/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/simplesamlphp/simplesamlphp/?branch=master)
[![Type coverage](https://shepherd.dev/github/simplesamlphp/simplesamlphp/coverage.svg)](https://shepherd.dev/github/simplesamlphp/simplesamlphp)
[![BrowserStack Status](https://automate.browserstack.com/badge.svg?badge_key=LzlCL29sZEVDRXJpdGtxZUdITFA3YjYyUFBBYkVVZDVDcG1YZXRaN2pvTT0tLVhCNzkwVUNGVFVjVFVicUg0R1BNR0E9PQ==--f9efb6f330bd98dd6e3c7b816ac2f0982275a872)](https://automate.browserstack.com/public-build/LzlCL29sZEVDRXJpdGtxZUdITFA3YjYyUFBBYkVVZDVDcG1YZXRaN2pvTT0tLVhCNzkwVUNGVFVjVFVicUg0R1BNR0E9PQ==--f9efb6f330bd98dd6e3c7b816ac2f0982275a872)


This is the official repository of the SimpleSAMLphp software.

* [SimpleSAMLphp homepage](https://simplesamlphp.org)
Expand Down
4 changes: 3 additions & 1 deletion .extlib/simplesamlphp/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ This page contains information about security vulnerabilities, incidents or issu

## Supported Versions

Only the current minor version (X.Y) receives bug and security fixes as a general rule. Release candidates are not considered stable, meaning the previous minor version will still receive fixes until the release candidate promotes to stable.
Only the current minor version (X.Y) receives bug and security fixes as a general rule.

The 1.19 branch will receive security and critical bug fixes until the end of 2023.

## Reporting a Vulnerability

Expand Down
9 changes: 4 additions & 5 deletions .extlib/simplesamlphp/TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ classes, and `SimpleSAML\Test\Module\modulename` for classes located in
modules.

For example, if you want to test the `SimpleSAML\Utils\HTTP` class
located in `lib/SimpleSAML/Utils/HTTP.php`, the tests must be in a class
located in `src/SimpleSAML/Utils/HTTP.php`, the tests must be in a class
named `HTTPTest` implemented in
`tests/lib/SimpleSAML/Utils/HTTPTest.php`, with the following namespace
`tests/src/SimpleSAML/Utils/HTTPTest.php`, with the following namespace
definition:

```php
Expand All @@ -45,9 +45,8 @@ throws an exception in a specific situation:
$this->expectException(ExpectedException::class);
```

Refer to [the `phpunit 5.7` documentation](https://phpunit.de/manual/5.7/en/installation.html)
for more information on how to write tests. We currently use the `phpunit 5.7`
since it is the last version to support php 5.6.
Refer to [the `phpunit 8.5` documentation](https://phpunit.readthedocs.io/en/8.5/)
for more information on how to write tests.

Once you have implemented your tests, you can run them locally. First,
make sure the `config` directory is **not** in the root of your
Expand Down
42 changes: 21 additions & 21 deletions .extlib/simplesamlphp/attributemap/deprecatedSchacNS.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@
}

$attributemap = [
SCHAC_NEW_NS.'schacCountryOfCitizenship' => SCHAC_OLD_NS.'schacCountryOfCitizenship',
SCHAC_NEW_NS.'schacCountryOfResidence' => SCHAC_OLD_NS.'schacCountryOfResidence',
SCHAC_NEW_NS.'schacDateOfBirth' => SCHAC_OLD_NS.'schacDateOfBirth',
SCHAC_NEW_NS.'schacExpiryDate' => SCHAC_OLD_NS.'schacExpiryDate',
SCHAC_NEW_NS.'schacGender' => SCHAC_OLD_NS.'schacGender',
SCHAC_NEW_NS.'schacHomeOrganization' => SCHAC_OLD_NS.'schacHomeOrganization',
SCHAC_NEW_NS.'schacHomeOrganizationType' => SCHAC_OLD_NS.'schacHomeOrganizationType',
SCHAC_NEW_NS.'schacMotherTongue' => SCHAC_OLD_NS.'schacMotherTongue',
SCHAC_NEW_NS.'schacPersonalPosition' => SCHAC_OLD_NS.'schacPersonalPosition',
SCHAC_NEW_NS.'schacPersonalTitle' => SCHAC_OLD_NS.'schacPersonalTitle',
SCHAC_NEW_NS.'schacPersonalUniqueCode' => SCHAC_OLD_NS.'schacPersonalUniqueCode',
SCHAC_NEW_NS.'schacPersonalUniqueID' => SCHAC_OLD_NS.'schacPersonalUniqueID',
SCHAC_NEW_NS.'schacPlaceOfBirth' => SCHAC_OLD_NS.'schacPlaceOfBirth',
SCHAC_NEW_NS.'schacProjectMembership' => SCHAC_OLD_NS.'schacProjectMembership',
SCHAC_NEW_NS.'schacProjectSpecificRole' => SCHAC_OLD_NS.'schacProjectSpecificRole',
SCHAC_NEW_NS.'schacSn1' => SCHAC_OLD_NS.'schacSn1',
SCHAC_NEW_NS.'schacSn2' => SCHAC_OLD_NS.'schacSn2',
SCHAC_NEW_NS.'schacUserPresenceID' => SCHAC_OLD_NS.'schacUserPresenceID',
SCHAC_NEW_NS.'schacUserPrivateAttribute' => SCHAC_OLD_NS.'schacUserPrivateAttribute',
SCHAC_NEW_NS.'schacUserStatus' => SCHAC_OLD_NS.'schacUserStatus',
SCHAC_NEW_NS.'schacYearOfBirth' => SCHAC_OLD_NS.'schacYearOfBirth',
SCHAC_NEW_NS . 'schacCountryOfCitizenship' => SCHAC_OLD_NS . 'schacCountryOfCitizenship',
SCHAC_NEW_NS . 'schacCountryOfResidence' => SCHAC_OLD_NS . 'schacCountryOfResidence',
SCHAC_NEW_NS . 'schacDateOfBirth' => SCHAC_OLD_NS . 'schacDateOfBirth',
SCHAC_NEW_NS . 'schacExpiryDate' => SCHAC_OLD_NS . 'schacExpiryDate',
SCHAC_NEW_NS . 'schacGender' => SCHAC_OLD_NS . 'schacGender',
SCHAC_NEW_NS . 'schacHomeOrganization' => SCHAC_OLD_NS . 'schacHomeOrganization',
SCHAC_NEW_NS . 'schacHomeOrganizationType' => SCHAC_OLD_NS . 'schacHomeOrganizationType',
SCHAC_NEW_NS . 'schacMotherTongue' => SCHAC_OLD_NS . 'schacMotherTongue',
SCHAC_NEW_NS . 'schacPersonalPosition' => SCHAC_OLD_NS . 'schacPersonalPosition',
SCHAC_NEW_NS . 'schacPersonalTitle' => SCHAC_OLD_NS . 'schacPersonalTitle',
SCHAC_NEW_NS . 'schacPersonalUniqueCode' => SCHAC_OLD_NS . 'schacPersonalUniqueCode',
SCHAC_NEW_NS . 'schacPersonalUniqueID' => SCHAC_OLD_NS . 'schacPersonalUniqueID',
SCHAC_NEW_NS . 'schacPlaceOfBirth' => SCHAC_OLD_NS . 'schacPlaceOfBirth',
SCHAC_NEW_NS . 'schacProjectMembership' => SCHAC_OLD_NS . 'schacProjectMembership',
SCHAC_NEW_NS . 'schacProjectSpecificRole' => SCHAC_OLD_NS . 'schacProjectSpecificRole',
SCHAC_NEW_NS . 'schacSn1' => SCHAC_OLD_NS . 'schacSn1',
SCHAC_NEW_NS . 'schacSn2' => SCHAC_OLD_NS . 'schacSn2',
SCHAC_NEW_NS . 'schacUserPresenceID' => SCHAC_OLD_NS . 'schacUserPresenceID',
SCHAC_NEW_NS . 'schacUserPrivateAttribute' => SCHAC_OLD_NS . 'schacUserPrivateAttribute',
SCHAC_NEW_NS . 'schacUserStatus' => SCHAC_OLD_NS . 'schacUserStatus',
SCHAC_NEW_NS . 'schacYearOfBirth' => SCHAC_OLD_NS . 'schacYearOfBirth',
];
Loading

0 comments on commit 63daa50

Please sign in to comment.