Skip to content

Instantly share code, notes, and snippets.

View Nicofuma's full-sized avatar

Tristan Darricau Nicofuma

View GitHub Profile
@Nicofuma
Nicofuma / Releasing 3.2.0-RC1.md
Last active June 27, 2016 20:26
Releasing 3.2.0-RC1

Todo List for 3.2.0-RC1

General

  • Make sure phpBB/docs/CREDTIS.txt is up to date
  • Make sure Contributors have their ranks
  • Make sure all reports in the security tracker are closed or invalid
  • Go through Issues fixed in 3.2.0-RC1 and correct any unreadable descriptions
  • Check the feature hightlights wiki page for completeness
  • Branch of prep-release-3.2.0-RC1 from master:
@Nicofuma
Nicofuma / fluent-setters.md
Created August 25, 2016 12:28
PHPStrom templates (PHP 5 & 7, type hint arrays, string[] support, ...)
#set($typeHintText = "$TYPE_HINT")
#set($nonTypeHintableTypes = ["", "string", "int", "mixed", "number", "void", "object", "real", "double", "float", "resource", "null", "bool", "boolean"])
#foreach($nonTypeHintableType in $nonTypeHintableTypes)
    #if ($nonTypeHintableType == $TYPE_HINT)
        #set($typeHintText = "")
    #end
#end

#if ($typeHintText.matches('^((\\)?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]+)+$'))
@Nicofuma
Nicofuma / composer.patch
Created September 5, 2016 19:20
Patch to skip invalid packages in cmposer repositories
diff --git a/src/Composer/Repository/ComposerRepository.php b/src/Composer/Repository/ComposerRepository.php
index 78ef743..d91d471 100644
--- a/src/Composer/Repository/ComposerRepository.php
+++ b/src/Composer/Repository/ComposerRepository.php
@@ -343,6 +343,7 @@ public function whatProvides(Pool $pool, $name, $bypassFilters = false)
$this->providers[$name] = array();
foreach ($packages['packages'] as $versions) {
foreach ($versions as $version) {
+ try {
// avoid loading the same objects twice
@Nicofuma
Nicofuma / a.php
Last active September 24, 2016 08:46
<?php
function phpbb_get_max_setting_from_group(\phpbb\db\driver\driver_interface $db, $user_id, $setting)
{
if ($setting !== 'max_recipients' && $setting !== 'message_limit')
{
throw new InvalidArgumentException('Setting "' . $setting . '" is not supported');
}
// Get maximum number of allowed recipients