<feed xmlns='http://www.w3.org/2005/Atom'>
<title>FreshRSS (Customized)/lib/Minz, branch 1.17.0</title>
<subtitle>Customized version of FreshRSS, a self-hosted RSS feed aggregator</subtitle>
<id>https://git.rdnlsmith.com/fresh-rss-custom/atom?h=1.17.0</id>
<link rel='self' href='https://git.rdnlsmith.com/fresh-rss-custom/atom?h=1.17.0'/>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/'/>
<updated>2020-07-08T10:11:55+00:00</updated>
<entry>
<title>Add a migration system (#2760)</title>
<updated>2020-07-08T10:11:55+00:00</updated>
<author>
<name>Marien Fressinaud</name>
<email>dev@marienfressinaud.fr</email>
</author>
<published>2020-07-08T10:11:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=8619cf6fa65bbd90871e7b7fe29816092a9d6c33'/>
<id>urn:sha1:8619cf6fa65bbd90871e7b7fe29816092a9d6c33</id>
<content type='text'>
* Add a Minz_Migrator class

Until now, we updated the database structure somewhere in the code but
it wasn't always consistent and somehow complicated to find. Also, this
code was always checked for nothing.

The Migrator aims to improve and ease the creation of migrations. It
should improve the way we apply the updates, making the update server
almost useless.

References:

- example of migration (before Migrator): https://github.com/FreshRSS/FreshRSS/commit/cc0db9af4f980829faa4bf0960617807b32fb4fa#diff-11a53443fa81512b128c66b065df0679R10
- update server: https://github.com/FreshRSS/update.freshrss.org
- PR moving the code of the update server to the core: https://github.com/FreshRSS/FreshRSS/pull/1760

* Automatically apply migrations

For now, administrators are used to have nothing to do during an update
else than getting the new code. I suggest to keep this behaviour and
automatically apply migrations if we detect new ones.

Another solution would be to create a CLI command and ask admins to call
it after getting the new code. It could hide migrations errors to end
users, but admin can forget to apply migrations since there are not used
to it.

* Add documentation for Minz Migrator

* Execute migrations even if next ones are applied

* Change mechanism to prevent multiple update at once

* Use mkdir to create the lock and to test it exists

Reference: https://stackoverflow.com/a/731634

* Append .lock to applied_migrations_path

There are no needs to define another file to serve as a lock.

* Change migrations naming convention

* Apply suggestions from code review

Co-Authored-By: Alexandre Alapetite &lt;alexandre@alapetite.fr&gt;

* Perform a low-cost migration versions comparaison

* Clarify version numbers concerning the migration system

Co-authored-by: Alexandre Alapetite &lt;alexandre@alapetite.fr&gt;</content>
</entry>
<entry>
<title>Add language detection when the user is not logged in (#3022)</title>
<updated>2020-06-05T08:10:46+00:00</updated>
<author>
<name>Alexis Degrugillier</name>
<email>aledeg@users.noreply.github.com</email>
</author>
<published>2020-06-05T08:10:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=36bda2e715ed822cc495ff419ad565084e241f43'/>
<id>urn:sha1:36bda2e715ed822cc495ff419ad565084e241f43</id>
<content type='text'>
Before, when the user was not logged in, pages where translated with the '_' user language.
Now, they are translated with the user preferred language if there is one supported by FreshRSS or with the system default language.</content>
</entry>
<entry>
<title>Improve logs during cron actualization (#2964)</title>
<updated>2020-05-14T19:21:39+00:00</updated>
<author>
<name>Alexandre Alapetite</name>
<email>alexandre@alapetite.fr</email>
</author>
<published>2020-05-14T19:21:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=11dd6e91b780bc218ecac540e1e9a8c426337930'/>
<id>urn:sha1:11dd6e91b780bc218ecac540e1e9a8c426337930</id>
<content type='text'>
For
https://github.com/FreshRSS/FreshRSS/issues/2952#issuecomment-626218921
And fix a little bug writing logs with the wrong user name</content>
</entry>
<entry>
<title>New core-extensions to allow Docker volumes for third-party extensions (#2837)</title>
<updated>2020-03-22T15:31:20+00:00</updated>
<author>
<name>Alexandre Alapetite</name>
<email>alexandre@alapetite.fr</email>
</author>
<published>2020-03-22T15:31:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=cd49e9819bea35a4db05e3e76910b739898c2219'/>
<id>urn:sha1:cd49e9819bea35a4db05e3e76910b739898c2219</id>
<content type='text'>
* New core-extensions to allow Docker volumes for third-party extensions

#Fix https://github.com/FreshRSS/FreshRSS/issues/2650
Split our extensions directory into two:
1) Core extensions shipped with FreshRSS in ./lib/core-extensions/
2) Third-party extensions modified by end-users in ./extensions/ which
can easily be mounted as a Docker volume

* Example of Docker Compose with extensions

* Back-compatibility + fix array merge bug</content>
</entry>
<entry>
<title>Fix wrong getHeader refactoring (#2749)</title>
<updated>2020-01-04T22:35:42+00:00</updated>
<author>
<name>Alexandre Alapetite</name>
<email>alexandre@alapetite.fr</email>
</author>
<published>2020-01-04T22:35:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=2aff347b2e942286292b21e0b20d93ab85220a17'/>
<id>urn:sha1:2aff347b2e942286292b21e0b20d93ab85220a17</id>
<content type='text'>
* Fix wrong getHeader refactoring

Fix regression introduced by
https://github.com/FreshRSS/FreshRSS/pull/2373
The refactoring required a call to init() even for static functions,
which is most of the time not done.
Removed premature abstraction of `$_SERVER`, which was the root cause of
the bug.
https://github.com/FreshRSS/FreshRSS/issues/2748#issuecomment-569898931

* Refactoring: Move serverIsPublic to Minz_Request

* Add mitigations for wrong configurations

Due to the regression, we have some existing configurations with a bad
base_url

* Forgot one instance
</content>
</entry>
<entry>
<title>Fix logging environment constants (#2745)</title>
<updated>2020-01-03T17:50:33+00:00</updated>
<author>
<name>Alexandre Alapetite</name>
<email>alexandre@alapetite.fr</email>
</author>
<published>2020-01-03T17:50:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=acc50df0efef8bd9fa937a5d640314c0e78e9117'/>
<id>urn:sha1:acc50df0efef8bd9fa937a5d640314c0e78e9117</id>
<content type='text'>
* Fix logging environment constants

* COPY_LOG_TO_SYSLOG was only working when Syslog was used
* FRESHRSS_ENV was not properly used to set logging level

* Simplify code

Always call `openlog()` even when it is not used

* Always specify syslog properties

https://github.com/FreshRSS/FreshRSS/pull/2745#discussion_r362207445

* $username is also needed further down

* No new line in syslog
</content>
</entry>
<entry>
<title>tec: Improve logs on DB connection failure (#2734)</title>
<updated>2019-12-25T22:21:12+00:00</updated>
<author>
<name>Marien Fressinaud</name>
<email>dev@marienfressinaud.fr</email>
</author>
<published>2019-12-25T22:21:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=f3d75b3ae5ba6f375a04b46e4f72a210cafe9d54'/>
<id>urn:sha1:f3d75b3ae5ba6f375a04b46e4f72a210cafe9d54</id>
<content type='text'>
For a moment, PHP wasn't able to connect to my database. I tried to
understand what happened, unfortunately, the logs were not very helpful
(it basically showed me information that I had in my configuration
file).

I changed the dsn string by the message from the raised exception, I
think it will be more useful.

Other call of Minz_PDOConnectionException are passing error messages
instead of string connection, so I took the opportunity to rename the
constructor argument.</content>
</entry>
<entry>
<title>tec: Allow to change CSP header from controllers</title>
<updated>2019-12-22T14:01:02+00:00</updated>
<author>
<name>Marien Fressinaud</name>
<email>dev@marienfressinaud.fr</email>
</author>
<published>2019-12-07T18:29:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=7802fd33a627dc7c582df871cfa613d9be8f8788'/>
<id>urn:sha1:7802fd33a627dc7c582df871cfa613d9be8f8788</id>
<content type='text'>
For an extension, I needed to call a script from an external domain.
Unfortunately, the CSP headers didn't allow this domain and I had to
patch manually the FreshRSS FrontController for my extension. It's
obviously not a long-term solution since it has nothing to do in the
core of FRSS, and I don't want to apply this patch manually at each
update.

With this patch, I allow changing the CSP header from inside the
controller actions. It allows extensions to modify headers. It's also an
opportunity to remove a bit of code from the FrontController. I wasn't
happy with the previous implementation anyhow.

Reference: https://github.com/flusio/xExtension-Flus/commit/ed12d56#diff-ff12e33ed31b23bda327499fa6e84eccR143
</content>
</entry>
<entry>
<title>Extend hooks (#2704)</title>
<updated>2019-12-07T11:59:53+00:00</updated>
<author>
<name>Clemens Neubauer</name>
<email>cn-tools@gmx.at</email>
</author>
<published>2019-12-07T11:59:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=08c6a1bdc16d7cc9717788172251c6e5eae3e443'/>
<id>urn:sha1:08c6a1bdc16d7cc9717788172251c6e5eae3e443</id>
<content type='text'>
It adds two new hooks to have more options for influencing with extensions.
</content>
</entry>
<entry>
<title>Refacto request class (#2373)</title>
<updated>2019-12-04T07:26:38+00:00</updated>
<author>
<name>Alexis Degrugillier</name>
<email>aledeg@users.noreply.github.com</email>
</author>
<published>2019-12-04T07:26:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=de2b323847e0a91119625e4f506f51ec9d43872f'/>
<id>urn:sha1:de2b323847e0a91119625e4f506f51ec9d43872f</id>
<content type='text'>
I split the code into more manageable chunks to make it more readable.
It's now easier to get a grasp on it. In the process, I tried to use
the yoda style notation to avoid unintentional variable assignement.
I also tried to exit early to avoid many "if" levels.

I have also added a better way to handle headers and a way to extract
languages from the request. It will be easier to choose which language
to use for i18n.</content>
</entry>
</feed>
