[Vortex] FCM: Add method to set private key by file

Review Request #1133 — Created April 11, 2024 and submitted

b.stoop
Lunr.Vortex
fcm/privatekeyfile
bdba7f0...
lunr

Based on release/0.9.x

FCM: Add method to set private key by file

https://github.com/lunr-php/lunr.vortex/pull/7

  • 0
  • 0
  • 5
  • 0
  • 5
Description From Last Updated
pprkut
  1. 
      
  2. src/Lunr/Vortex/FCM/FCMDispatcher.php (Diff revision 1)
     
     

    maybe is_readable() is better here

  3. src/Lunr/Vortex/FCM/FCMDispatcher.php (Diff revision 1)
     
     

    file_get_contents can return FALSE, even if the file exists.

  4. 
      
b.stoop
pprkut
  1. 
      
  2. src/Lunr/Vortex/FCM/FCMDispatcher.php (Diff revision 2)
     
     

    "File does not exist is is not readable!"

    Also, not really an InvalidArgument. Probably a RuntimeException is best here, and below.

  3. 
      
b.stoop
smillernl
  1. 
      
  2. src/Lunr/Vortex/FCM/FCMDispatcher.php (Diff revision 3)
     
     
     
     
     
     

    Isn't this duplicated by the check below?

  3. 
      
b.stoop
pprkut
  1. 
      
  2. src/Lunr/Vortex/FCM/FCMDispatcher.php (Diff revision 4)
     
     

    I think set_private_key_from_file() fits better. What do others think here?

    1. yeah, from file sounds better to me as well

    2. Same

  3. 
      
b.stoop
pprkut
  1. Ship It!
  2. 
      
b.stoop
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (aa56657)
Loading...