<feed xmlns='http://www.w3.org/2005/Atom'>
<title>FreshRSS (Customized)/lib/Minz/ModelPdo.php, branch 1.20.2</title>
<subtitle>Customized version of FreshRSS, a self-hosted RSS feed aggregator</subtitle>
<id>https://git.rdnlsmith.com/fresh-rss-custom/atom?h=1.20.2</id>
<link rel='self' href='https://git.rdnlsmith.com/fresh-rss-custom/atom?h=1.20.2'/>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/'/>
<updated>2022-01-07T09:05:09+00:00</updated>
<entry>
<title>Optimise Minz_ModelPdo::class (#4119)</title>
<updated>2022-01-07T09:05:09+00:00</updated>
<author>
<name>Luc SANCHEZ</name>
<email>4697568+ColonelMoutarde@users.noreply.github.com</email>
</author>
<published>2022-01-07T09:05:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=ed19445f74c30854c60873cd1df1c38e15fc316b'/>
<id>urn:sha1:ed19445f74c30854c60873cd1df1c38e15fc316b</id>
<content type='text'>
* - Fix typo,
- remove unnecessary null in property,
- remove unused property,
- add phpDoc,
- add ext PDO in composer.json,
- use strict comparison,
- indentation

* Translate

* Update lib/Minz/ModelPdo.php

Co-authored-by: Frans de Jonge &lt;fransdejonge@gmail.com&gt;

* The code is more explicite

* Fix phpstan

* Fix phpstan expect one

* Fix phpstan

* Return in back...

* make fix-all

* Fix exception and more types

* Fix more types

* Remove ext- in composer.json

Co-authored-by: Luc SANCHEZ &lt;l.sanchez-ext@ubitransport.com&gt;
Co-authored-by: Frans de Jonge &lt;fransdejonge@gmail.com&gt;
Co-authored-by: Alexandre Alapetite &lt;alexandre@alapetite.fr&gt;</content>
</entry>
<entry>
<title>PHPStan level 5 (#4110)</title>
<updated>2022-01-04T12:59:09+00:00</updated>
<author>
<name>Alexandre Alapetite</name>
<email>alexandre@alapetite.fr</email>
</author>
<published>2022-01-04T12:59:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=1335a0e3cf11a0d4248e9eaaf748b89e6df741ef'/>
<id>urn:sha1:1335a0e3cf11a0d4248e9eaaf748b89e6df741ef</id>
<content type='text'>
* Fix most PHPDocs errors
Contributes to https://github.com/FreshRSS/FreshRSS/issues/4103
https://phpstan.org/writing-php-code/phpdoc-types

* Avoid func_get_args
Use variadic syntax instead https://php.net/manual/functions.arguments#functions.variable-arg-list
And avoid dynamic functions names when possible to more easily identify calls and unused functions.
Contributes to https://github.com/FreshRSS/FreshRSS/issues/4103

* PHPStan level 3

* PHPStand level 4

* Update default to PHPStan level 4

* Towards level 5

* Fix level 4 regression

* Towards level 5

* Pass PHPStan level 5

* Towards level 6

* Remove erronenous regression from changelog
https://github.com/FreshRSS/FreshRSS/pull/4116</content>
</entry>
<entry>
<title>Explicit PDO::ERRMODE_SILENT (#3408)</title>
<updated>2021-01-30T20:53:17+00:00</updated>
<author>
<name>Alexandre Alapetite</name>
<email>alexandre@alapetite.fr</email>
</author>
<published>2021-01-30T20:53:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=2b007ee989425bdf352b28c6cddead60a54095c6'/>
<id>urn:sha1:2b007ee989425bdf352b28c6cddead60a54095c6</id>
<content type='text'>
`PDO::ERRMODE_SILENT` is the default value
https://php.net/pdo.error-handling
We just make it explicit
#fix https://github.com/FreshRSS/FreshRSS/issues/3402
But in the issue above, it looks like it is in `PDO::ERRMODE_EXCEPTION`
mode</content>
</entry>
<entry>
<title>Possiblity to autoinstall in Docker Compose (#3353)</title>
<updated>2021-01-11T21:36:50+00:00</updated>
<author>
<name>Alexandre Alapetite</name>
<email>alexandre@alapetite.fr</email>
</author>
<published>2021-01-11T21:36:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=8dfe2097992307b572b42647b53a76dd5d93aaa9'/>
<id>urn:sha1:8dfe2097992307b572b42647b53a76dd5d93aaa9</id>
<content type='text'>
* Possiblity to autoinstall in Docker Compose

#fix https://github.com/FreshRSS/FreshRSS/issues/3349

It is simply calling our existing CLI: do-install.php and
create-user.php
https://github.com/FreshRSS/FreshRSS/tree/master/cli

FreshRSS will typically be ready a few seconds before the database, so
introduce a tolerance when the database is not available / up (yet) by
trying a few times to connect. Also useful to avoid service interruption
when DB service is restarted.

Example:

```yml
freshrss-app:
    image: freshrss/freshrss
    container_name:
freshrss-app
    hostname: freshrss-app
    restart: unless-stopped

ports:
      - "8080:80"
    depends_on:
      - freshrss-db

volumes:
      - data:/var/www/FreshRSS/data
      -
extensions:/var/www/FreshRSS/extensions
    environment:
      CRON_MIN:
'*/20'
      FRESHRSS_ENV: development
      FRESHRSS_INSTALL: |-

--api_enabled
        --base_url https://rss.example.net

--db-base freshrss
        --db-host freshrss-db
        --db-password
freshrss
        --db-type pgsql
        --db-user freshrss

--default_user admin
        --language en
      FRESHRSS_USER: |-

--api_password freshrss
        --email user@example.net

--language en
        --password freshrss
        --user admin
      TZ:
Europe/Paris
```

* Minor type f in find

* shellcheck</content>
</entry>
<entry>
<title>Add a file for each PDO class (#3301)</title>
<updated>2020-12-28T23:11:34+00:00</updated>
<author>
<name>Alexis Degrugillier</name>
<email>aledeg@users.noreply.github.com</email>
</author>
<published>2020-12-28T23:11:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=3f4c86f80f7cf7fd0ba9260d46eafc55d46fe9af'/>
<id>urn:sha1:3f4c86f80f7cf7fd0ba9260d46eafc55d46fe9af</id>
<content type='text'>
Before, we had 5 classes in the ModelPdo file. It was bad for 2 reasons.
The first reason is that it is considered bad practice to have multiple
class in one file. This is especially true when using autoloading. On top
of that it is less readable considering the size of the file. The second
reason is that so far we were lucky. Everytime we needed to access the
database, it was through the ModelPdo class which loads all the other
classes. If we want to access directly the connection, it wont be loaded.
On top of that, the system is configured to work on a single database,
but as we have every connection definition in a single file, all classes
were loaded at the same time. Thus using memory and processing time for
nothing.
Now, we have a file for each class. To work with autoloading, classes
were slightly renamed to match autoloading rules.</content>
</entry>
<entry>
<title>Revert "Add a file for each PDO class (#3297)"</title>
<updated>2020-12-28T18:53:55+00:00</updated>
<author>
<name>Alexandre Alapetite</name>
<email>alexandre@alapetite.fr</email>
</author>
<published>2020-12-28T18:53:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=0a2d9b3b54ee51a3965d79c68409ef045ad5834b'/>
<id>urn:sha1:0a2d9b3b54ee51a3965d79c68409ef045ad5834b</id>
<content type='text'>
This reverts commit e1ee58816ba76734e4115fc12898b13de665b220.
</content>
</entry>
<entry>
<title>Add a file for each PDO class (#3297)</title>
<updated>2020-12-28T15:44:08+00:00</updated>
<author>
<name>Alexis Degrugillier</name>
<email>aledeg@users.noreply.github.com</email>
</author>
<published>2020-12-28T15:44:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=e1ee58816ba76734e4115fc12898b13de665b220'/>
<id>urn:sha1:e1ee58816ba76734e4115fc12898b13de665b220</id>
<content type='text'>
Before, we had 5 classes in the ModelPdo file. It was bad for 2 reasons.
The first reason is that it is considered bad practice to have multiple
class in one file. This is especially true when using autoloading. On top
of that it is less readable considering the size of the file. The second
reason is that so far we were lucky. Everytime we needed to access the
database, it was through the ModelPdo class which loads all the other
classes. If we want to access directly the connection, it wont be loaded.
On top of that, the system is configured to work on a single database,
but as we have every connection definition in a single file, all classes
were loaded at the same time. Thus using memory and processing time for
nothing.
Now, we have a file for each class. To work with autoloading, classes
were slightly renamed to match autoloading rules.</content>
</entry>
<entry>
<title>Minz: support PHP8 lint (#3207)</title>
<updated>2020-10-03T13:47:58+00:00</updated>
<author>
<name>Alexandre Alapetite</name>
<email>alexandre@alapetite.fr</email>
</author>
<published>2020-10-03T13:47:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=2f88b267805c71e9859c41bb50c348b1566cfc06'/>
<id>urn:sha1:2f88b267805c71e9859c41bb50c348b1566cfc06</id>
<content type='text'>
* Minz: support PHP8 lint

Fix PHP8 Fatal error: Declaration of MinzPDO::query($statement) must be
compatible with PDO::query(string $query, ?int $fetch_mode = null, mixed
...$fetch_mode_args) in /FreshRSS/lib/Minz/ModelPdo.php on line 159
Errors parsing /FreshRSS/lib/Minz/ModelPdo.php

* Fix argument name

* Please phpcs in Travis</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>Fix CLI bug regarding an empty user (#2646)</title>
<updated>2019-11-08T22:11:35+00:00</updated>
<author>
<name>Alexandre Alapetite</name>
<email>alexandre@alapetite.fr</email>
</author>
<published>2019-11-08T22:11:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=f1d1d46651140961d6dc9436b3b9c66a2723f896'/>
<id>urn:sha1:f1d1d46651140961d6dc9436b3b9c66a2723f896</id>
<content type='text'>
Fix https://github.com/FreshRSS/FreshRSS/issues/2644</content>
</entry>
</feed>
